简体   繁体   中英

get information from page facebook api graph

I would like to get the information shown in image below from my facebook page (Most Popular Week, Most Popular City, Most Popular Age Group) with FQL.

在此输入图像描述

How can I achieve this?

For a facebook page you can query the following Graph API endpoint: graph.facebook.com/{page-id}/insights

Or via FQL:

SELECT ... FROM insights WHERE object_id = <page-id> AND metric = B AND end_time = C AND period = D

The Most popular City (page_impressions_by_city_unique) and Most popular Age Group (page_impressions_by_age_gender_unique) metrics are reported as unique values from the Insights API Endpoint.

Most popular Week is not reported by the API as far as I can see. You would need to query the API for weekly statistics and compare these in your application code.

You should probably check the documentation yourself:
Graph API: https://developers.facebook.com/docs/reference/api/insights/
FQL: https://developers.facebook.com/docs/reference/fql/insights

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM