2

我可以打开一个 FB 会话,然后关闭它,但是下次我点击此代码时,它会直接跳过用户登录屏幕 (io5) 并且已经让我登录。如何确保我重新/启动每次FB登录画面?我什至在打开会话之前就尝试关闭它,但这也不起作用。

[self closeFacebookSession];  // close the session so we should get login screen, but we do not!

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

[FBSession openActiveSessionWithReadPermissions:permissions
                                           allowLoginUI:YES
                                      completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
                                          [self sessionStateChanged:session state:state error:error];
                                      }];
}

- (void)closeFacebookSession {
    [FBSession.activeSession closeAndClearTokenInformation];
}
4

0 回答 0