Reputation: 19
I am using FB Graph API to get the post reach posted on a page. But the API always returns an empty data object (no errors).
Query:
https://graph.facebook.com/v2.10/[POST_ID]/insights?metric=post_impressions_unique&access_token=[PAGE_ACCESS_TOKEN]
Response:
{
"data": [
],
"paging": {
"previous": "https://graph.facebook.com/v2.11/[POST_ID]/insights?access_token=[PAGE_ACCESS_TOKEN]&metric=post_impressions_unique&since=1528268400&until=1528441200",
"next": "https://graph.facebook.com/v2.11/[POST_ID]/insights?access_token=[PAGE_ACCESS_TOKEN]&metric=post_impressions_unique&since=1528614000&until=1528786800"
}
}
I have tried it with other API versions v2.11, v2.12 and v3.0 etc. same response. And posts do have a reach metric when checked on the page.
Anyone have any clue about whats wrong here?
Upvotes: 0
Views: 887
Reputation: 19
Thanks to CBroe 's comment pointed me in the right direction.
My app that I used to get page access token didn't have the read_insights permission.
Upvotes: 1