Having found that it is possible to generate a Facebook Page Access Token that does not expire (with help from @Igy), here is a clear, step-by-step quide for all those looking to the same:
- Make sure you are the admin of the FB page you wish to pull info from
- Create a FB App (should be with the same user account that is the page admin)
- Head over to the Facebook Graph API Explorer
- On the top right, select the FB App you created from the "Application" drop down list
- Click "Get Access Token"
- Make sure you add the
manage_pagespermission - Convert this short-lived access token into a long-lived one by making this Graph API call:
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> - Grab the new long-lived access token returned back
- Make a Graph API call to see your accounts using the new long-lived access token:
https://graph.facebook.com/me/accounts?access_token=<your long-lived access token> - Grab the
access_tokenfor the page you'll be pulling info from - Lint the token to see that it is set to
Expires: Never!
That should do it. You should now have a Facebook Page Access Token that doesn't expire!
本文详细介绍了如何生成一个不会过期的Facebook页面访问令牌。首先确保你是目标Facebook页面的管理员,并使用相同的账号创建一个Facebook应用。然后通过Facebook Graph API Explorer获取一个短期访问令牌,并将其转换为长期访问令牌。
4194

被折叠的 条评论
为什么被折叠?



