I get data from the Facebook insights via Facebook Graph API more than year. And recently started all my requests (like {id}/insights
) to return with an error: (#190) This method must be called with a Page Access Token
.
But the Access token contains scopes manage_pages,read_insights
.
Any ideas?

- 327
- 1
- 5
- 15
-
2https://developers.facebook.com/docs/graph-api/changelog/version2.11#gapi-90-pages – CBroe Feb 09 '18 at 14:18
3 Answers
manage_pages,read_insights
This will give a user access_token
, that u can use to manage pages & check insights,
But a page token became required for any /insights
endpoint since 5th feb 2018
Use your manage_pages
scope & user_token
to get a Page access token
Send a get request to this endpoint
GET /{page-id}?fields=access_token
Output
{
"access_token": "{your-page-access-token}",
"id": "{page-id}"
}
You can use the returned access token to call /insights
endpoint now.

- 72,880
- 8
- 113
- 130

- 6,119
- 4
- 27
- 39
-
Can you link to where Facebook mentions this change is effective since Feb 5th 2018? I couldn't find it.. – Noam Feb 22 '18 at 07:45
-
I do see this in v2.11 changelog "/page/insights — This edge will require a Page access token of the page in question for all metrics." - but this is also affecting calls for older versions of the API. How can that be? Is this documented anywhere? – Noam Feb 22 '18 at 08:05
-
1yes, they had a notice, a 90 day breaking changes or something, also when u check docs for older versions at the top it will mention that all versions are affected by this change. – Achraf Khouadja Feb 22 '18 at 08:43
-
2This doesn't work for me. I only get `Tried accessing nonexisting field (user_access_token) on node type (Page)` when I use `GET /{page-id}?fields=user_access_token` – Jesse Novotny Aug 20 '18 at 17:14
-
1
-
-
@twigg sadly no. Worse yet, FB has implemented an app review process which blocks endpoints until they are approved. The problem is that this review process requires that I demonstrate how we use each specific endpoint which is impossible since the endpoint is not yet approved. Every request returns "Application does not have permission". It's a royal catch 22 and contacting their support team has proven fruitless. – Jesse Novotny Sep 05 '18 at 15:11
-
Downvote. This doesn't work. I request WITH the same token as I receive for `fields=access_token`. Wrong answer – Green May 30 '19 at 15:16
-
1@Green you must misunderstand the answer, it works! I can help you if you need further help – Achraf Khouadja May 30 '19 at 22:37
As I cant add comment I'll write it here.
Field name is access_token
which you can check here with your page id.
For PHP
If you had your script in PHP, using Facebook SDK for PHP and now it brokes, you just need to retrieve token and pass it instead of access/refresh token you were using.
//Retrieve new 'page access token'.
$token = $fbApiClient -> get( "/{$pageId}?fields=access_token") -> getGraphNode()-> asArray();
//$q is your insights query which was working until now :(
//But with page acces token it will work again.
$response = $fbApiClient -> get( $q, $token['access_token']) -> getGraphEdge();
//(...) rest of script.
I think its easily adaptable to other languages too. Also you can (and propably should) store page access token and use it wherever you need, instead of retrieving it each time.

- 1
- 1

- 333
- 4
- 10
You can get the Page Access Token easily.
After collecting the access_token from the OAuth session, make a call to the /me/accounts endpoint with the fields=access_token,name,id parameter.
In the response body, you will find the Page Access Token. Save this token and use it when making your insights query or any other API request related to the page.

- 57,590
- 26
- 140
- 166