In one of my iOS apps, I am using FBSDK
for Facebook login and it works correctly. But we would like to handle the case that the access token becomes invalid. If I have changed my password through some other Facebook login then as per the Facebook blog post, it should invalidate the access token, but while I am fetching the stored token using [FBSDKAccessToken currentAccessToken].tokenString
, it appears that the token is still valid, based on the following:
[FBSDKAccessToken currentAccessToken].tokenString
does not return nil.- Using the following url to validate the access token
[NSString stringWithFormat:@"https://graph.facebook.com/APP_ID/permissions?access_token=ACCESS_TOKEN]
, as per stackoverflow post
How to verify the account password changed (and corresponding token invalidation) scenario for Facebook?
We want to detect the invalid token and ask the user to login again, if the account password has been changed through logging in to Facebook somewhere else and changing the password.
Any suggestion is appreciated.
Thanks.