I have a Facebook page of my own. What I would like is to access the posts in that page as a JSON by sending an API call. I do not need to return the content as a embedded web page like we get in the oEmbed. What is the approach to that?
- In the Facebook developer dashboard I have created an application, which means, I have Client Token and App ID incase I need to have access_token to pass.
- I know the Page ID of the Facebook page that I need to access
Is that a must Facebook Login integrated to retrieve such public page content?
When I run following command (True values of page_id, app_id & client_access removed here)
curl -i -X GET "https://graph.facebook.com/page_id?access_token=app_id|client_access"
I'm getting following error
{
"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-accessfor details. ",
"type":"OAuthException",
"code":100,
"fbtrace_id":"Aal5TRTWtw_phIz7-rHzj1L"
}
}