Iszar
Iszar

Reputation: 51

facebook post and page insights not working

I'm using Graph API to get statistics from my pages , I created an application and I got my permissions (read_insights , manage_pages ...) , but only some metrics work fine like page_fans_country and most of them (page_fans / post_impressions / page_impressions / page_fans_gender_age ...) don't work and return : [data] => Array () . I tried 3 different pages , the first have 20.000 likes , the second 3.000 and the third 30 likes , and I can't get any information from them except for page_fans_country . But when I try those previous queries in Graph Api Explorer with its token , it works fine , when I use my token it doesn't work , and i'm sure i have the read_insights permission

Please , Help me .

Upvotes: 1

Views: 1366

Answers (3)

Tudor Constantin
Tudor Constantin

Reputation: 26861

I've had the same problem. It seems that I get some insights by prefixing the message fb id with the page id, so instead of hitting https://graph.facebook.com/messageFbId/insights?access_token=... (the official docs say to do it), I get the insights from https://graph.facebook.com/pageId_messageFbId/insights?access_token=....

Hope this helps

Upvotes: 0

helpse
helpse

Reputation: 1548

I got the answer

Change the order of the scope parameter:

Try

"email,read_insights,manage_pages"

Instead of

"email,manage_pages,read_insights"

That worked for me.

Upvotes: 2

cpilko
cpilko

Reputation: 11852

For most page insights, you need a page access token.

A normal user access token, even one from a page admin, won't return any data.

Upvotes: 0

Related Questions