Facebook Page Insights生命周期指标无返回结果问题求助
Let’s break down your issues step by step—you’re dealing with two distinct problems here: empty lifetime data for page_fans, and accessing lifetime metrics for post-specific video analytics.
1. Fixing page_fans Lifetime Data Returning an Empty Array
While the v3.2 Graph API docs state page_fans supports the lifetime period, your request might have a small formatting issue, or there’s a more reliable alternative to get this data:
- Clean up your request URL: Your current request includes an unnecessary
fields=&parameter that could be causing parsing problems. Use this simplified request instead:{page_id}/insights?metric=page_fans&period=lifetime - Better alternative: Fetch total fans directly from the Page endpoint: For lifetime total likes, you don’t even need the Insights API. The Page’s core endpoint gives you real-time total likes, which is more efficient and reliable:
This will return a straightforward response like:{page_id}?fields=fan_count{ "fan_count": 21580, "id": "{page_id}" }
If you still get empty data with the Insights request, double-check your access token has pages_show_list and pages_read_engagement permissions (though since you’re getting day-period data, permissions are probably already set correctly—parameter formatting is the more likely culprit).
2. Lifetime Data for Post Video Metrics
The metrics you listed (post_video_view_time_by_region_id, post_video_views_by_distribution_type, etc.) are post-specific metrics, not page-wide ones. Here’s what you need to do to access their cumulative data:
- Use the Post Insights endpoint, not the Page endpoint: These metrics can’t be fetched from
{page_id}/insights. You need to make requests for each individual post using:{post_id}/insights?metric=post_video_view_time_by_region_id,post_video_views_by_distribution_type&period=lifetime - Note on period support: Not all post video metrics support the
lifetimeperiod. For many, Facebook only provides data for periods likeday,week,month, orvideo_publishing_period(which covers the entire time since the post was published—effectively the post’s lifetime). Iflifetimereturns empty data, swap it forvideo_publishing_periodto get cumulative data from the post’s publish date to now.
Example Request for Post Video Cumulative Data
{post_id}/insights?metric=post_video_view_time_by_country_id&period=video_publishing_period
This should return cumulative video view time broken down by country for the post since it went live.
内容的提问来源于stack exchange,提问作者Amit

