Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blank page while logging in with Facebook SDK on iOS 10

In my app I'm using facebook SDK to login a user like this:

FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
    [login logInWithReadPermissions: @[@"public_profile", @"email"] fromViewController:self handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
...
}

Everything was working good on iOS 9, but on iOS 10 when the safari view controller is presented (managed by facebook SDK) I get a blank page right away and nothing happens: Blank Page

Found a lot of issues regarding this blank page on facebook login, but always related to delegation after login, in this case I'm getting the blank page right after pressing the "login with facebook" button.

Anyone passed by the same issue?

like image 703
joaocdn Avatar asked Sep 16 '16 12:09

joaocdn


1 Answers

use FBSDKLoginBehaviorWeb:

FBSDKLoginManager *loginMgr = [[FBSDKLoginManager alloc] init];
loginMgr.loginBehavior = FBSDKLoginBehaviorWeb;
[loginMgr logInWithReadPermissions
like image 60
向文品 Avatar answered Sep 27 '22 21:09

向文品