Facebook Pages access when running on the back-end?
1

I have been instructed to write back-end code to get basic data from Facebook Pages (as opposed to Profiles) e.g. https://www.facebook.com/KevinMichelMLA

This getting of basic data is going to be part of a larger workflow that will run on one of our servers. There's not going to be an Android or iOS app in that sense.

We've create a Meta App, and have connected it to a verified Business portfolio.

We want to be able to access the public Pages of community organisations and politicians. We appear to need an access_token for that, thus the creation of Meta App so that we have the app_id and app_secret from which to generate an App Token.

However, when we issue that App Token in a search for say, KevinMichelMLA in the Graph API Explorer with pages/search?q=KevinMichelMLA&fields=id,name,location,link we get

{
  "error": {
    "message": "(#10) 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": 10,
    "fbtrace_id": "AGw_BKkZM8ijOvohhKGSMSa"
  }
}

So how do you add pages_read_engagement to an "App Token"? You can't. So where to from here?

Somehow we have to be able to build a full-length access_token. A User Token is useless because we're interested in Pages not Users. And generating a Page Access token that targets the aforementioned Business portfolio proves equally useless and when logged in as the Business portfolio one only has a limited set of possible Page Access tokens to choose from.

Yes, I am aware of the documentation where it says, " To generate a page access token, an admin of the page must grant your app the Page permission or permissions needed. " and clearly we aren't an admin of KevinMichelMLA or any of the other public pages that we might wish to access.

If I'm reading the documentation correctly, the 'Page Public Content Access' and 'Page Public Metadata Access' features are only available after App Review. I'm bound to fail App Review because I can't demonstrate what I need a pass in App Review to demonstrate.

I really hope I'm missing something obvious. I need someone to authoritatively say what can and can't be achieved and why.

Bruce
Asked about 3 months ago
Selected Answer
1

It requires PPCA which requires app review. You can test such basic requests with a page your are admin of while the app is in dev.

August 7 at 3:47 AM
Lars