We use Facebook SSO in our application. When you click Facebook, the application to enter the Facebook application displays the login. But after logging in, he will not return to the application. But if the user has already registered with the Facebook application, click the "Login" button to go to the Facebook application and display a dialog box with permission. When clicked, allow it to return to the application. Is this the default behavior? Or are there problems with my code or our Facebook app settings? Thanks in advance.
SHAppDelegate *appDelegate = [SHAppDelegate application]; NSArray * permissions = [[NSArray alloc]initWithObjects:FACEBBOK_PERMISSION, nil]; if (!appDelegate.session.isOpen) { appDelegate.session = [[[FBSession alloc] initWithPermissions:permissions] autorelease]; if (appDelegate.session.state == FBSessionStateCreatedTokenLoaded) { [appDelegate.session openWithCompletionHandler:^(FBSession *session, FBSessionState status, NSError *error) { [self updateView]; }]; } } if (appDelegate.session.isOpen) { [appDelegate.session closeAndClearTokenInformation]; } else { if (appDelegate.session.state != FBSessionStateCreated) {
source share