facebookfacebook-graph-apifacebook-insights

Facebook page insights lifetime metrics doesn't return results


I'm trying to get some insights on page I own, for example page_fans which is stated in https://developers.facebook.com/docs/graph-api/reference/v3.2/insights as having both "day" and "lifetime" periods. (This is NOT the only metric I want to get but for the sake of simplicity I'll give it as an example.)

Getting it by day works, but I only wa nt to know the lifetime value, so instead of period=day I tried period=lifetime, and I get an empty data array.

This is the request I am sending:

{page_id}/insights?fields=&metric=page_fans&period=lifetime

Note, if I change to period=day I get a nice object:

"data": [
    {
      "name": "page_fans",
      "period": "day",
      "values": [
        {
          "value": 21578,
          "end_time": "2019-02-24T08:00:00+0000"
        },
        {
          "value": 21580,
          "end_time": "2019-02-25T08:00:00+0000"
        }
      ],
      "title": "Lifetime Total Likes",
      "description": "Lifetime: The total number of people who have liked your Page. (Unique Users)",
      "id": "{page_id}/insights/page_fans/day"
    }
  ],

Other metrics I want to get lifetime data for include: "post_video_view_time_by_region_id", "post_video_views_by_distribution_type", "post_video_view_time_by_distribution_type", "post_video_view_time_by_country_id"


Solution

  • According to the changelog for v3.2

    Page Insights

    These changes apply to v3.2+, and will apply to all versions on January 21, 2019.

    Period parameters have been changed to day from lifetime for the following metrics. The lifetime period parameter will return an empty dataset.

    • page_fans
    • page_fans_city
    • page_fans_country
    • page_fans_gender_age
    • page_fans_locale