Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get page fans distribution by country?

I am trying to get the number of likes by country for a given page that I do not own (public datas). Just something like that : http://www.socialbakers.com/facebook-pages/40796308305-coca-cola

But I am not able to get this information with the Graph API (FQL or not). Do I miss something?

like image 851
Sébastien Falquier Avatar asked Feb 13 '13 15:02

Sébastien Falquier


1 Answers

Use read_insights with PAGE_ID/insights/page_fans_country/lifetime endpoint

Country level insights for pages are public in the API.

{
  "data": [
    {
      "id": "40796308305/insights/page_fans_country/lifetime", 
      "name": "page_fans_country", 
      "period": "lifetime", 
      "values": [
        {
          "value": {
            "BR": 17169677, 
            "US": 13454934, 
            "MX": 5644191, 
            "AR": 3578155, 
            "FR": 3384137, 
            "IN": 2904517, 
            "GB": 2662948, 
            "TH": 2590348, 
            "IT": 2397743, 
            "CO": 1894922, 
            "ID": 1815370, 
            "EG": 1785809, 
            "PH": 1610465, 
            "TR": 1605864, 
            "PK": 1526578, 
            "CL": 1486394, 
            "VN": 1377232, 
            "DE": 1297679, 
            "PL": 1186274, 
            "VE": 1084718, 
            "CA": 987125, 
            "RO": 921001, 
            "PE": 813268, 
            "EC": 810028, 
            "ES": 789604, 
            "AU": 760158, 
            "MA": 571517, 
            "RS": 472829, 
            "PT": 466989, 
            "NG": 452234, 
            "TN": 442278, 
            "BE": 430922, 
            "MY": 411240, 
            "ZA": 400423, 
            "SE": 352346, 
            "GR": 332333, 
            "HU": 331825, 
            "KE": 327691, 
            "NL": 325613, 
            "GT": 323790, 
            "CR": 303266, 
            "PR": 287217, 
            "DZ": 282063, 
            "DO": 278955, 
            "BD": 271926
          }, 
          "end_time": "2014-12-02T08:00:00+0000"
        }, 
like image 115
phwd Avatar answered Sep 27 '22 16:09

phwd