I am developing an app that syncs with users Facebook account and fetches Facebook page information. Initially, app asks for Login with Facebook and gets page list. After getting pages I am calling API to get posts associated with each page. Once I get post details then I am calling insight APIs to get insights of each post. This flow working fine with development mode but when I switch to Live mode I am getting the following error
Client error: `GET https://graph.facebook.com/v4.0/100575944711552/feed` resulted in a `400 Bad Request` response:{"error":{"message":"(#100) Pages Public Content Access requires either app secret proof or an app token","type":"OAuthE (truncated...)
{"userId":1,"email":"[email protected]","exception":"[object] (GuzzleHttp\\Exception\\ClientException(code: 400): Client error: `GET https://graph.facebook.com/v4.0/100575944711552/feed` resulted in a `400 Bad Request` response:
{\"error\":{\"message\":\"(#100) Pages Public Content Access requires either app secret proof or an app token\",\"type\":\"OAuthE (truncated...)
From the details what I observed I am getting this error while using,
GET /v5.0/{page-id}/feed HTTP/1.1
Host: graph.facebook.com
this endpoint. I am currently having 2 permissions approved,
Can anyone help me to understand what is the exact issue?
I also appear this error. for me, I found that since graph api v5.0
, request has changed. The docs said:
Page Public Content Access
This change applies to v5.0+
Requests made to endpoints that require the Page Public Content Access feature must be made with either an App Access Token or include the app's App Secret. If the calling app has been granted the manage_pages permission however, an app access token or app secret is not required.
If you only retrieve public data. You can use requests by app access token quick fixed. But if you want to get more. You need to follow the docs update. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With