Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bravokeyl/7263f65ca3423dee27c5c21d31fa021c to your computer and use it in GitHub Desktop.
Save bravokeyl/7263f65ca3423dee27c5c21d31fa021c to your computer and use it in GitHub Desktop.
How to get a Facebook Page Access Token that doesn't expire Never!
How to get a Facebook Page Access Token that doesn't expire Never!
- Go to http://developers.facebook.com/tools/explorer/
- Get a User Access Token with a permission "manage_pages"
- Convert this short-lived access token into a long-lived one by making this Graph API call:
https://graph.facebook.com/v2.6/oauth/access_token?client_id=<your FB App ID >&client_secret=<your FB App secret>&grant_type=fb_exchange_token&fb_exchange_token=<your short-lived access token>
- Make a call Graph API:
https://graph.facebook.com/v2.6/<your personal account FB user id>/accounts?access_token=<your long-lived access token>
- The returned access_token has no expiration unless you change your password or not more admin of the target page or deauthorize FB page
source:
http://stackoverflow.com/questions/17197970/facebook-permanent-page-access-token
http://stackoverflow.com/questions/12168452/long-lasting-fb-access-token-for-server-to-pull-fb-page-info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment