Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook graph api log out not working

I am using Graph Api for Facebook authetication, I use following method for loging in.

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

This causes the log in page to be opened in mobile safari.I use [FBSession.activeSession closeAndClearTokenInformation]; for loging out. My problem is i cant login back as a different user because the logout process doen't clear session in safari.

Same problem exists in the sample app provided in developer.facebook.com http://cloud.github.com/downloads/facebook/facebook-ios-sdk/FacebookSDK-3.0.8.pkg

like image 807
Ab'initio Avatar asked Aug 30 '12 10:08

Ab'initio


People also ask

Why log out is not working on Facebook?

5. Rollback to a previous version of Facebook (Android) If your Facebook logout problems trickle to other apps (as Facebook can be used to login to games and other apps), or if you just don't want to wait for Facebook to fix it for you, you can simply roll back to a previous version of Facebook.

Does Facebook automatically log out?

You might be logged out because the site is undergoing maintenance or experiencing some other issues. If Facebook keeps logging you out, even after you made sure that you cleared cookies and cache and no one else is trying to log in, you should try just logging out and waiting a while.

How long do Facebook access tokens last?

When your app uses Facebook Login to authenticate someone, it receives a User access token. If your app uses one of the Facebook SDKs, this token lasts for about 60 days. However, the SDKs automatically refresh the token whenever the person uses your app, so the tokens expire 60 days after last use.


1 Answers

Facebook app on iphone is usually meant for a single person , but when you test as developer you try to log in with different userid . Thats where the problem comes, before loggin into app u should first loggin fb app with the desired user id. It happens because fb api dnt let apps to make facebook app to signout. Every time user loggout from an app will make it fb signout also and that will be very annoying for the user.

like image 57
Dushyant Singh Avatar answered Sep 24 '22 17:09

Dushyant Singh