Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 9 not logged in Facebook login?

I am using Xcode 7.0, testing on iOS 9.0.2 and using Facebook SDK 4.7.0. Code=308 "(null)" issue occur in iOS 9.I am using objective-c code in my project. how to resolve this? Below attach my code.

FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];

 [login logInWithReadPermissions:@[@"public_profile",@"email", @"user_friends"] fromViewController:self handler:^(FBSDKLoginManagerLoginResult *result, NSError *error){

    if ([FBSDKAccessToken currentAccessToken]) { startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {

             if (!error) {
             }

         }];

    }
}];
like image 429
Anbu Avatar asked Oct 27 '15 12:10

Anbu


1 Answers

iOS9.2.1

This fixes my 308 issues

Open as 'source code', plist file, search for LSApplicationQueriesSchemes, then add/modify as needed.

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>fbauth2</string>
    <string>fbapi</string>
    <string>fb-messenger-api</string>
    <string>fbshareextension</string>
</array>
like image 141
dklt Avatar answered Sep 28 '22 01:09

dklt