I use Facebook to enter the application using FBSDKLoginManager . Facebook docs seem to imply that this saves a token for subsequent application launches, so the user does not need to log in every time:
FBSDKLoginManager sets this token for you, and when it sets currentAccessToken, it also automatically writes it to the cache.
I am trying to extract this token from the specified cache when the application starts, or display the login screen of the Facebook application if it cannot be found:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [FBSDKProfile enableUpdatesOnAccessTokenChange:YES]; if ([FBSDKAccessToken currentAccessToken]) {
This shows the login screen every time. The Facebook documentation does not explain how to handle this very simple use case. Did I miss something?
ios objective-c facebook facebook-ios-sdk
Emilien h
source share