Reputation: 765
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?
Upvotes: 3
Views: 1044
Reputation: 2061
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
Upvotes: 2