3

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.

enter image description here

How can I achieve this?

2
  • Have you tried anything yet? Any search/research on this yet? Commented Sep 26, 2013 at 18:01
  • yes but hi not worked $this->request->data['Pag']['idpage']= $result[0]['id']; $params = array('method' => 'fql.query', 'query' => "SELECT pic,type,name,about,current_location,unread_message_count FROM page WHERE page_id='".$result[0]['id']."'",); $result = $facebook->api($params); Commented Sep 26, 2013 at 19:57

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.