- 利用https://developers.facebook.com/tools/explorer
me?id={user_id} 生成user access token EAAfrwYPg2CcBO03BsZC2vFeLLTampTGF4ryMivUXQJfSYufqJh1vxQFapR2Lh4yDIPILo7MLTCDYZAWR26VaGKYhhZBxFMWDaPyvOJh2x8VvvFN3Jm1qxBX3dZBxlHqzYE1VLi3ZA6vAHbFWnZBWiytbVf6ZBJZBpVKgA7ZA8WjG2HqU0K165zseLbZBBB1xXaMUZCuxr2pCmQPZAIspH9BQ3wZDZD
取得长期user access token
oauth/access_token?grant_type=fb_exchange_token&client_id={app_id}&client_secret={app_secret}&fb_exchange_token={token} oauth/access_token?grant_type=fb_exchange_token&client_id=2229541210740775&client_secret=b549af5357592e1840466628d4fd1652&fb_exchange_token=EAAfrwYPg2CcBO03BsZC2vFeLLTampTGF4ryMivUXQJfSYufqJh1vxQFapR2Lh4yDIPILo7MLTCDYZAWR26VaGKYhhZBxFMWDaPyvOJh2x8VvvFN3Jm1qxBX3dZBxlHqzYE1VLi3ZA6vAHbFWnZBWiytbVf6ZBJZBpVKgA7ZA8WjG2HqU0K165zseLbZBBB1xXaMUZCuxr2pCmQPZAIspH9BQ3wZDZD
{
{
“access_token”: “EAAfrwYPg2CcBOZCjlMRkbaPoFnd9fZBDMlB67yfLbUMgPZBoggFIjDySm3iOURYNuNZAjPPT6vEJYNZAHpmR0xrCuGBCNHn7SBqhHAe8vOTXr1IJmMCjcuZBI3sU42vGrXT7CpLrwqFHSZBf8UqZB6WBaMiQ9UOOK7LuenGCRjtBEtax8qZAba2OVZAeDI”,
“token_type”: “bearer”
}
```
1. 取得 Page Access Token
```
https://developers.facebook.com/docs/facebook-login/guides/access-tokens/get-long-lived/
[**https://www.facebook.com/business/tools/meta-business-suite**](https://www.facebook.com/business/tools/meta-business-suite)
业务资产组合
账户
应用-添加应用
用户
系统用户
创建系统用户
分配资产
生成口令-永不过期 ①这是用户口令
用①的用户口令取得访问口令
[_https://graph.facebook.com/v21.0/me/accounts?access_token=_系统用户的_token_](https://graph.facebook.com/v21.0/me/accounts?access_token=%E7%B3%BB%E7%BB%9F%E7%94%A8%E6%88%B7%E7%9A%84token)
curl --location --request GET 'https://graph.facebook.com/v21.0/me/accounts?access_token=EAAfrwYPg2CcBO96Lns7HRS6KaajpqRHEZBUuP9E4Rf7oMZCGaSV7AIOV2GK8FKsiZAKJOiP09I11ZZAS9Fq5pfZCTiVu2hjOdtjyAE7FCrxMtMGzJZCORGgeEhnxv8GBkmBieCpVK7Pe5qSCNOzfS3jFSHTEm05j1Ba2kkwdU4Bimh9RwS5KgTNwPXcbHGOE7mAwZDZD'
{
"data": [
{
"access_token": "EAAfrwYPg2CcBO2WLT5oD7QpRgZCgxJpqGpzhXL7ZAa4LxSbsGk61mdQ7YMpWnx1iUJqIt3U0RcmlVRFos0jb3xyZBanSvPmcLTYeyZATyDhDdOhLmYc6vm3SdyOmj4vMQg2sObWZBJuqyYjXBCBJR63eE8W2kZC2Kv4mgjUNrtGDjuoNZBKiicTZAm3HAUvqRmpZATNAlCTDu",
"category": "IT企業",
"category_list": [
{
"id": "1130035050337269",
"name": "IT企業"
}
],
"name": "TestPage",
"id": "469068969630885",
"tasks": [
"ADVERTISE",
"ANALYZE",
"CREATE_CONTENT",
"MESSAGING",
"MODERATE",
"MANAGE"
]
}
],
"paging": {
"cursors": {
"before": "QVFIUldJdW1JMjN0bWtDUVE5dk9xdUhIT1I3UnhodUNFelNaQmFOZAkJIR2VxTjJweTBXRFFLa2RESXdGSWtHVEhIVDZAzQnZAfSzM1STgzMVU0NlNoazNSLW13",
"after": "QVFIUldJdW1JMjN0bWtDUVE5dk9xdUhIT1I3UnhodUNFelNaQmFOZAkJIR2VxTjJweTBXRFFLa2RESXdGSWtHVEhIVDZAzQnZAfSzM1STgzMVU0NlNoazNSLW13"
}
}
}
[https://developers.facebook.com/](https://developers.facebook.com/)