Generate permanent Facebook Page Access Token to access Graph API

Sharing is Caring

Hello All,
Hope you are doing well

Earlier I have posted about using facebook graph API to get profile information, post status on facebook timeline and post as facebook page.

To Access Facebook graph API we need to use Access Token and each access token has it’s expiry time (temporary access tokens) but to build an application we need a permanent access token so that our app doesn’t stop working after a time and it is not very easy to get a permanent access token, there are some steps you need to follow to get one

Create a simple Website Facebook App (If you don’t have one)

Go to Register and Configure an App and learn how to create an app then go to All Apps and add a new app

Generate Short lived Access Token

Select the app from application dropdown list
Click on Get Token –> Get User Access Token, In select permissions popup check manage_pages and click Get Access Token
Now you can see short-lived access token appears in Access Token field

Generate Long-lived Access Token

For this we need AppId and App Secret, Go to My Apps page and Open App and copy AppId and App Secret
Now make a GET request from your browser to get long-lived access token
it’ll return a long-lived access token,
Facebook Page Access Token
you can check it’s expiration time in Access Token Debugger

Generate Permanent Access Token

Make a GET request to

It’ll return an array of data[] that has a permanent access token for all pages that you manage

Cheers 🙂 Happy Learning

Related Posts

0 thoughts on “Generate permanent Facebook Page Access Token to access Graph API”

Leave a Reply

Your email address will not be published. Required fields are marked *