0

I'm trying to log into facebook using:

FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
    [login logInWithReadPermissions: @[@"public_profile", @"email", @"user_friends"]
     fromViewController:self
     handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
         if (error) {
             NSLog(@"Process error");
         } else if (result.isCancelled) {
             NSLog(@"Cancelled");
         } else {
             NSLog(@"Logged in");
         }
     }];

After the login is successful, the web dailog should be dismissed automatially.But it is not happening.It stays on this screen:

enter image description here

And the strange thing is that , when I click on Done button in the web dailog, the result status result.isCancelled is displayed as YES even after the login is successful and also the [FBSDKAccessToken currentAccessToken] is nil.

Edit: I'm able to do the login and get the token via loginBehaviour FBSDKLoginBehaviorSystemAccount but not through NativeBehaviour

I implemented every step mentioned in the Facebook SDK Developers page.

Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109

0 Answers0