Get access to never expiring facebook page access token by following these steps.
1. Create Facebook App
- Go to My Apps.
- Click “+ Add a New App”.
- Setup a website app.
You don’t need to change its permissions or anything. You just need an app that wont go away before you’re done with your access token.
2. Get User Short-Lived Access Token
- Go to the Graph API Explorer.
- Select the application you want to get the access token for (in the “Application” drop-down menu, not the “My Apps” menu).
- Click “Get Token” > “Get User Access Token”.
- In the pop-up, under the “Extended Permissions” tab, check “manage_pages”.
- Click “Get Access Token”.
- Grant access from a Facebook account that has access to manage the target page. Note that if this user loses access the final, never-expiring access token will likely stop working.
The token that appears in the “Access Token” field is your short-lived access token.
3. Generate Long-Lived Access Token
Past this URL in browser:
entering in your app’s ID and secret and the short-lived token generated in the previous step.
You cannot use the Graph API Explorer. For some reason it gets stuck on this request. I think it’s because the response isn’t JSON, but a query string. Since it’s a GET request, you can just go to the URL in your browser.
“token123” will be your long-lived access token. You can put it into the Access Token Debugger to verify. Under “Expires” it should have something like “2 months”.
4. Get User ID
Using the long-lived access token, make a GET request to
id field is your account ID. This will be used to get permanent access token for the next step.
5. Get Permanent Page Access Token
Past link in your browser with your Account ID and Long lived access token.
The JSON response should have a
data field under which is an array of items the user has access to. Find the item for the page you want the permanent access token from. The
access_token field should have your permanent access token. Copy it and test it in the Access Token Debugger. Under “Expires” it should say “Never”.