Getting Long-term Authentication Tokens
By default, a Facebook access token expires after two hours. You can extend the token to be valid for sixty days.
Before you beginBefore generating the long-term access token, you have to get your App ID, App secret, and your App access token.
- Procedure
- Copy the following URL to a
.txt file:
https://graph.facebook.com/oauth/access_token?client_id=your_app_id&client_secret=your_app_secret&grant_type=fb_exchange_token&fb_exchange_token=your_regular_access_token
- Change the your_app_id, your_app_secret, and your_regular_access_token to your App ID, App secret, and your App access token.
- Copy the URL to your browser and press Enter.
ResultThe long-term access token is displayed in the browser.