I am connecting my application with Facebook and Google Firebase. I followed all steps and every thing working fine but the database generated in Firebase Google is empty. Do I need to use Realtime database and then store the FB user data programmatically? or FB user info is stored automatically in Firebase database, when you loggedIn. For reference: https://firebase.google.com/docs/auth/ios/facebook-login
-(void)loginButton:(FBSDKLoginButton *)loginButton didCompleteWithResult:(FBSDKLoginManagerLoginResult *)result error:(NSError *)error
{
if (error == nil) {
FIRAuthCredential *credential = [FIRFacebookAuthProvider
credentialWithAccessToken:[FBSDKAccessToken currentAccessToken]
.tokenString];
[[FIRAuth auth] signInWithCredential:credential
completion:^(FIRUser *user, NSError *error) {
// ...
}];
} else {
NSLog(@"%@", error.localizedDescription);
}
}
- (IBAction)FBLogin:(id)sender {
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
[login
logInWithReadPermissions: @[@"public_profile", @"email", @"user_friends",@"user_birthday",@"user_location"]
fromViewController:self
handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (error) {
NSLog(@"Process error");
} else if (result.isCancelled) {
NSLog(@"Cancelled");
} else {
NSLog(@"Logged in");
[self performSegueWithIdentifier:@"GotoMainMenu" sender:self];
}
}];
}