我可以打开一个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];
}