Thursday, 13 April 2017

FB Analytics for Apps API query for daily active users for a deployed app

I'm trying to programmatically access the "Daily Active Users" stats from the Facebook Analytics for Apps.

However, I'm not entirely sure if I'm accessing the correct API endpoint or that I'm even querying the correct metric, namely facebook_features_daily_active_users.

Here is what I'm doing:

  1. Generate the access token for my app.
  2. Execute GET request on the following access point: GET /v2.8/{app-id}/app_insights/facebook_features_daily_active_users?period=daily

The output that I get is:

{
  "error": {
    "message": "(#3000) Reading Insights of a Page/App/Domain/Event Source Group not owned by the querying user or application",
    "type": "OAuthException",
    "code": 3000,
    "fbtrace_id": "DJ825z1yUtY"
  }
}

So I have several questions:

  1. What is the correct API endpoint/metric I should be querying?
  2. What options do I need to select, when generating the access token in order to actually get the statistics, rather than the error message above?

Any help would be greatly appreciated!



via Lirik

No comments:

Post a Comment