First, I want to note that I do not want to request the offline_access extended permission. It's there for a reason but this isn't it.
I am creating an html5 app using the Facebook Javascript API. The user is on a single page for a long time playing the game. I get an access token at the beginning of the flow with FB.getLoginStatus but this token expires at some point and so I am then unable to query Facebook for the user.
I have tried calling FB.getLoginStatus again when the first token fails but this does not appear to be giving me a new access token.
Is the only way to reload the page? Kind of sucks because the user's state is disrupted.
FB.getLoginStatus will reauthenticate a user to your application and will give you a new access token to work with. You should be able to get the new token from response.authResponse.accessToken.
Are you receiving any particular error after the first token fails?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With