3
votes

I am trying to extend a new short-lived (1h) User access token, and am getting the following error response (using https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&client_id=XXX&client_secret=YYY&fb_exchange_token=ZZZ):

{ 
   "error": {
      "message": "Session key invalid. This could be because the session key has an incorrect format, or because the user has revoked this session",
      "type": "OAuthException",
      "code": 452,
      "error_subcode": 1349045,
      "is_transient": false,
      "error_user_title": "An invalid Platform session was found.",
      "error_user_msg": "An invalid Platform session was found.",
      "fbtrace_id": "GhzaJGRwVK5" 
   } 
}

I have tried changing my password / logging out and in, incognito mode, but I keep getting the same result. I had a working never-expiring token in the past, but I got logged out of that somehow, or at least, when I debug it it says:

Error validating access token: The user has not authorized application XXXXXXXX

I'm thinking I might need to a) kill all previous sessions or b) re-authorize the application with my never-expiring token... Any suggestions?

Any help is much appreciated!

1
I’d try and remove the app completely from my user settings, and then login again. - CBroe
My app was in fact removed in my Apps and Websites. Once I renewed access, I was able to extend the short-lived token. The previous never-expiring token was invalidated because my password has changed ^^. Thank you @CBroe ! - user1886563
“The previous never-expiring token was invalidated because my password has changed” - yes, that is supposed to happen. - CBroe
We've got same error when trying to login to FB via iOS sdk by using web view - Yevgeniy Logachev

1 Answers

0
votes

I turned off Graph API Explorer's and my app's Data Access in my User account settings (https://www.facebook.com/settings?tab=applications). After that, I renewed access and generated a new Access Token using the Access Token Tool.