I cannot seem to generate a page access token. I've tried using the Graph API Explorer by selecting "Get Page Access Token" from the User or Page dropdown, but it opens a window with the following error:
I've also tried sending the following API request but even though it returns a 200 OK
status code, the content is an empty array!
curl -i -X GET "https://graph.facebook.com/{your-user-id}/accounts?access_token={user-access-token}
Result:
{"data":[]}
I've also tried to get the page access token with the following command:
curl -i -X GET "https://graph.facebook.com/v14.0/<page_id>?access_token=<user_access_token>&fields=access_token"
Result:
{"error":{"message":"(#100) Object does not exist, cannot be loaded due to missing permission or reviewable feature, or does not support this operation. This endpoint requires the 'pages_read_engagement' permission or the 'Page Public Content Access' feature or the 'Page Public Metadata Access' feature. Refer to https://developers.facebook.com/docs/apps/review/login-permissions#manage-pages, https://developers.facebook.com/docs/apps/review/feature#reference-PAGES_ACCESS and https://developers.facebook.com/docs/apps/review/feature#page-public-metadata-access for details.","type":"OAuthException","code":100,"fbtrace_id":"AIx208__9nozhxypMyxZYpy"}}
My user is listed as the admin for this page and I previously was able to create page access tokens simply by using the Graph API Explorer above.
In the Graph API Explorer, I don't seem to have any such option for 'pages_read_engagement.'
How can I generate a page access token?
Note: I've also asked this question on the Facebook Developer Community Forum but no one has answered yet. This seems like a simple question so I'm surprised I've not gotten any responses thus far. https://developers.facebook.com/community/threads/911494286473743/
Ref. https://developers.facebook.com/docs/facebook-login/guides/access-tokens#pagetokens