我需要帮助从Facebook-SDK-3.1
iOS 6登录Facebook sdk
Facebook在我的.dont 知道它到底是什么......如果我这样做,然后从代码中......当我再次按下按钮登录时,它会自动而不要求。并再次自动登录,即使在注销后也是如此。/。任何人都可以帮助我为什么在注销后它要求存储以前的访问令牌和密码。sessionLoginSample
WebView
install
project
logout
log-in
id and pssword``login page
和代码是
- (IBAction)buttonClickHandler:(id)sender {
AppDelegate* appDelegate = [[UIApplication sharedApplication]delegate];
if (appDelegate.session.isOpen) {
[appDelegate.session closeAndClearTokenInformation];
} else {
if (appDelegate.session.state != FBSessionStateCreated) {
appDelegate.session = [[FBSession alloc] initWithPermissions:[NSArray arrayWithObjects:@"email", nil]];
}
[appDelegate.session openWithBehavior:FBSessionLoginBehaviorForcingWebView
completionHandler:^(FBSession *session,
FBSessionState state,
NSError *error) {
FBSession.activeSession = session;
[self updateView];
NSLog(@" state=%d",state);
[FBRequestConnection
startForMeWithCompletionHandler:^(FBRequestConnection *connection,
id<FBGraphUser> user,
NSError *error) {
userInfo = @"";
userInfo = user.username;
NSLog(@"string %@", userInfo);
[self checkfacebook];
}];
}]; }
}