Facebook apps require a "never-expires" access code how to get one?
2 Answers
This is how you get one:
- Create Facebook App via the FB Developers site
- Grab your APPID, APPSECRET, USERTOKEN
- Go here: https://graph.facebook.com/v2.9/oauth/access_token?grant_type=fb_exchange_token&client_id=APPID&client_secret=APPSECRET&fb_exchange_token=USERTOKEN
- Grab the access token generated on step3 and replace it here: https://graph.facebook.com/PAGEID?fields=access_token&access_token=ACCESSTOKEN

- 69
- 1
- 7
Make sure you understand the difference between Tokens, there are App Tokens, User Tokens and Page Tokens, for different purposes.
There is only one token that does not expire: The App Access Token. You don´t need to generate it, it´s just "App-ID|App-Secret" (with a pipe sign in the middle).
Page Tokens are not always valid forever anymore, as you can read in the docs https://developers.facebook.com/docs/facebook-login/access-tokens/expiration-and-extension
If the User access token you use to retrieve this Page access token is a long-lived token, you get a long-lived Page token that is good for at least 60 days.
However, if you use a Page administrator token and your app has business permissions, the returned Page access token does not expire.
So, in order to get an Extended Page Token (that is valid for 60 days or forever), these are the steps:
- Authorize with
manage_pages
(and other permissions you may need) - Extend the resulting User Token to get an Extended User Token
- Use
/page-id?fields=access_token
with the Extended User Token to get an Extended Page Token for a specific Page, or/me/accounts?fields=access_token
to get Extended Page Tokens for all the Pages you manage.

- 72,880
- 8
- 113
- 130