简体   繁体   中英

iOS 7 FB SDK, Authenticating User Into FB Using Native App

I authenticate the user into FB using the code below. It works and uses the FB information in the iOS settings. If the user is not logged in he is presented with the web UI.

How can I authenticate the user into FB using the installed native app instead of the web UI?

NSArray *permissions = [[NSArray alloc] initWithObjects:@"email",
                                                        nil];

[FBSession  openActiveSessionWithReadPermissions:permissions allowLoginUI:YES
                          completionHandler:^(FBSession *session,
                                              FBSessionState status,
                                              NSError *error) {
                              if(session.isOpen){
                                  NSLog(@"IS LOGGED IN");
                              }                                  
                          }];

I don't think that you can... My experience is that the FB API makes always a call to the web app. The only thing you can do for a fast authentication is to hope that the iPhone users have made the authentication into the general setting of the phone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM