jsmrtn / craftagram

Grab Instagram content through the Instagram Basic Display API
Other
14 stars 8 forks source link

[question] Long access token refresh not persisted? #62

Closed qrazi closed 1 year ago

qrazi commented 1 year ago

I might be missing something completely, but when I try to refresh the longAccessToken either through the URL from the cron documentation, or through the console command, I don't see it being updated in the Craftagram settings table.

I only see it being saved to the settings table during the Authorization flow.

Am I missing something or is the refresh token flow not working right now?

qrazi commented 1 year ago

And I could have read the documentation... :facepalm: The refresh of a long access token does not replace it with a new token, but extends the expiration time of the original long access token. See the docs: https://developers.facebook.com/docs/instagram-basic-display-api/guides/long-lived-access-tokens#refresh-a-long-lived-token

So the long access token is supposed to remain unchanged.