Firebase simple login in iOS

我的未来我决定 提交于 2019-12-05 06:38:53

问题


I am using FirebaseSimpleLogin for authenticating my app via facebook. I have updated .plist file with facebookapp id and display name. I have also registered bundle id of my app. As suggested in docs, i have also implemented openUrl in AppDelegate and following method in my login with Facebook button. But console is showing third party provider error occurred. Anyone have any clue??

    - ( 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 : ^{

             } ] ;

         }
       }];
     }

In 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;
     }

来源:https://stackoverflow.com/questions/22909431/firebase-simple-login-in-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!