I am trying to integrate the new Facebook SDK for iOS and had a problem understanding some concepts.
I authenticate using
[FBSession sessionOpenWithPermissions:...]auth dialog comes up and I return the app. Auth successful.Then shut down the app, relaunch again.
[[FBSession activeSession] accessToken]successfully returns previously saved token.However, at the same time,
[[FBSession activeSession] isOpen]returnsNO. (This means session is not ready for use.)Also,
[[FBSession activeSession] state]isFBSessionStateCreatedTokenLoadedat this time. Tutorial here usesisOpencall to verify active session is loaded and opened with token.
So what do we call to open the token-loaded session without redirecting user to auth dialog?
Hints:
In FBSessionState enum, for FBSessionStateOpen it says:
Open session state indicating user has logged in or a cached token is available.
However FBSessionStateCreatedTokenLoaded is described as:
One of two initial session states indicating that a cached token was loaded; when a session is in this state, a call to open* will result in an open session, without UX or app-switching
Could you please help me figure out understanding these session transitions?