Peter Horne
Peter Horne

Reputation: 6846

Restricted Facebook Page Details over Graph API using PHP SDK

I'm trying to use Facebook's PHP SDK to get the number of likes for a fan page. This works fine for most pages, but some pages are returning false because they have age restrictions. Using the PHP SDK, how do I get the number of likes for an age restricted fan page over the graph API?

I'm currently not using an access token to read the pages. Would an app access token work? And if so how do I use an app access token with the PHP SDK.

Upvotes: 4

Views: 925

Answers (2)

Peter Horne
Peter Horne

Reputation: 6846

Restricted pages can be read using the graph api but it requires a user's access token. I had tried it with an app access token which does not work.

The relevant documentation can be found here: https://developers.facebook.com/docs/reference/api/page/

Upvotes: 2

Oleg
Oleg

Reputation: 7387

You should to use Page access token. To get list of your pages with access tokens, use me/accounts method of the Graph API.

Upvotes: 0

Related Questions