Login simples do Firebase no iOS
Estou usando o FirebaseSimpleLogin para autenticar meu aplicativo via facebook. Atualizei o arquivo .plist com o ID do facebookapp e o nome para exibição. Também registrei o ID do pacote do meu aplicativo. Conforme sugerido nos documentos, também implementei o openUrl no AppDelegate e o método a seguir no meu login com o botão Facebook. Mas o console está mostrando um erro de provedor de terceiros. Alguém tem alguma pista ??
- ( IBAction ) onBtnFacebook : ( id ) sender {
[self.authClient loginToFacebookAppWithId:@"767056019984823" permissions:@[@"email"] audience:ACFacebookAudienceOnlyMe withCompletionBlock:^(NSError *error, FAUser *user) {
if (error != nil) {
NSLog(@"%@",error);
UIAlertView *message = [[UIAlertView alloc] initWithTitle:@""
message:@"There was an error in opening your account. Please try again."
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[message show];
} else {
UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Welcome"
message:self.email
delegate:nil
cancelButtonTitle:@""
otherButtonTitles:nil];
[message show];
[ self dismissViewControllerAnimated : YES completion : ^{
} ] ;
}
}];
}
Em Appdelegate.m
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
BOOL wasHandled = [FBAppCall handleOpenURL:url sourceApplication:sourceApplication];
NSLog(@"hello");
// add any app-specific handling code here
return wasHandled;
}