Facebook Graph API "/{page-id}/feed" is not working with App Access Token

1.9k Views Asked by At

We are facing issues with Graph API. The Facebook Graph API "/{page-id}/feed" is not working for all pages with a valid App Access Token. Previously it used to work. We noticed it today the API is throwing error


{ "error": { "message": "An unknown error has occurred.", "type": "OAuthException", "code": 1 } }


Not working pages:

https://graph.facebook.com/22934684677/feed?access_token= https://graph.facebook.com/42798291365/feed?access_token=

Note: And its working if we pass a User Access token instead of App Token.

Facebook developer Docs says "An access token is required to view publicly shared posts." So App Access Token should work!

Does Facebook change something inside the API?. Can any one help to solve the issue

2

There are 2 best solutions below

0
andyrandy On

You should use a Page Token for Page data. Pages not working with an App Token are most likely restricted by age or location. Since the App Token does not include any user session, you can´t be sure if the user should have access to it.

If it does not work with an App Token AND the Page is definitely not restricted, file a bug.

1
Shireesh Asthana On

This is happening because some of the posts returned might have extra restrictions on them which need a user token to verify this. Use a page token or a user token as a workaround for this. Having said that, the request shouldn't fail with an unknown error and we're working on a fix for the same on the bug report here: https://developers.facebook.com/bugs/783169051760311/