allenylzhou
allenylzhou

Reputation: 1461

Unable to retrieve page insights using Graph API explorer

I have the 'Insights Analyst' permission to my facebook page, and I try to use Graph API Explorer to get the metric page_fans

I "Get Access Token" with 'read_insights' and 'manage_pages', and "Submit" a graph API call that looks something like

GET /<page_id>/insights/page_fans

But then I get an empty response. (This occurs for all metrics except page_story_adds_unique, page_storytellers, and page_admin_num_posts)

{
  "data": [
  ], 
  "paging": {
    "previous": "https://graph.facebook.com/<page_id>/insights/post_storytellers/?since=1369004893&until=1369264093", 
    "next": "https://graph.facebook.com/<page_id>/insights/post_storytellers/?since=1369523293&until=1369782493"
  }
}

What permissions am I missing? What am I doing wrong?

Upvotes: 5

Views: 2030

Answers (1)

Christopher Hackett
Christopher Hackett

Reputation: 6192

There seems to be a larger than usual backlog of data missing in the insights at the moment. Use values for since and until to see where the data is.

/<page_id>/insights/page_fans?since=1369008000&until=1371686400

The numbers are unix timestamps to specify the date range you want. If the range is too large then you will get

"error": {
    "message": "Unsupported operation", 
    "type": "FacebookApiException", 
    "code": 100
  }

I know it's very frustrating and Facebook seems to not have any proper way of checking that the data is backlogged.

Upvotes: 1

Related Questions