Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Access Token Expiring Prematurely

I recently disabled offline_access as requested by Facebook's 1 October breaking change, and have re-authorised all linked services that suddenly terminated on 1 October. The access tokens I received all indicated an expiry date of "never" according to Facebook's debug page, and they worked flawlessly for a few days.

However at some random point over the past few days, some seem to have be discontinued without warning. I have tried using the debug tool (https://developers.facebook.com/tools/debug) and it just says it cannot recognise the token (Error Parsing URL/Error parsing input URL, no data was scraped.) It does not indicate a problem like a changed password or something similar.

I know that without an extension, tokens are normally issued for 2 hours, but these worked for days. Aren't tokens meant to last for 60 days without refreshing them?

Or do I need to start refreshing them daily using the valid keys I currently have?

like image 346
John Ginsberg Avatar asked Dec 08 '25 13:12

John Ginsberg


1 Answers

When you (re)authorise an app the token only lasts for a couple of hours, you have to do a token exchange to make it last for 60 days.

But Facebook do randomly kill tokens... I've had my own expire with the "User changed password" message - when I most certainly didn't.

like image 119
Stephen Atty Avatar answered Dec 10 '25 01:12

Stephen Atty



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!