Facebook APIs
Generating Graph Access Token that Never Expire
- Make sure you are the admin of the FB page you wish to pull info from
- Create a FB App using the Page admin's account
- Head over to the Facebook Graph API Explorer
- Select the FB App you created from the "Application" drop down list
- Click "Get User Access Token"
- Make sure that "manage_pages" permission is checked
- Make a GET request to: https://graph.facebook.com/oauth/access_token?client_id=<App ID>&client_secret=<App secret>&grant_type=fb_exchange_token&fb_exchange_token=<short-lived access token>
- Copy the new long-lived token from the response
- Make another get request to: https://graph.facebook.com/me/accounts?access_token=<your long-lived access token>
- Copy the new token and paste it to Access Token Debug Tool, make sure that it never expires
References
- This stackoverflow post