1
votes

If you exchange a short-term access token to extend it to 60 days using

https://graph.facebook.com/oauth/access_token?client_id=(APP_ID)&client_secret=(APP_SECRET)&grant_type=fb_exchange_token&fb_exchange_token=(AccessToken1ST)

When the access token returned from this (AccessToken2) is about to expire, can you use the original short-term access token (AccessToken1ST) to exchange for a new access token (AccessToken3)?

I would test it out, but it's just returning the same access token over and over, since access token 2 has not expired yet.

I know I could probably do this with access token 2, but I'm reading access token 1 from a certain file, since I am not logging in with a user, I just want to read public facebook data and would rather not have to manually update access token 1 ( since I don't have write access to it) and would rather just use access token 1 to generate access token 3 if it is possible.

1
Chris: Your question is valid, but I have submitted an edit - to the effect that you cannot exchange an expired token - but only a short-term access token BEFORE it expires. Your languages indicates that you can exchange expired tokens, which defeats the whole purpose of expiring them! - Shreeni
Ahh, understand now, misunderstood the functionality then. Answered my question, thanks! - chris
@Shreeni You could post this as an answer so it can be accepted. - kapa

1 Answers

1
votes

You cannot exchange an expired token - but only a short-term access token BEFORE it expires.

Your languages indicates that you can exchange expired tokens, which defeats the whole purpose of expiring them!