图形API如何让Facebook页面会员/喜欢(Graph API how get facebook

2019-07-19 02:09发布

Facebook的类似检查

我发现一个有趣的应用程序。 此FB-应用在任何的粉丝专页让所有喜欢和质量以及国家排序呢!

我的问题:

如何做这些应用程序获得从图形API的数据?

第一:让粉丝专页对象不需要访问令牌

https://graph.facebook.com/cocacola/

{
   "about": "The Coca-Cola Facebook Page is a collection of your stories showing how people from around the world have helped make Coke into what it is today.",
   "checkins": 146,
   "description": "Created in 1886 in Atlanta, Georgia, by Dr. John S. Pemberton, Coca-Cola was first offered as a fountain beverage at Jacob's Pharmacy by mixing Coca-Cola syrup with carbonated water. \n\nCoca-Cola was patented in 1887, registered as a trademark in 1893 and by 1895 it was being sold in every state and territory in the United States. In 1899, The Coca-Cola Company began franchised bottling operations in the United States. \n\nCoca-Cola might owe its origins to the United States, but its popularity has made it truly universal. Today, you can find Coca-Cola in virtually every part of the world.\n\nCoca-Cola Page House Rules: http://CokeURL.com/q28a",
   "founded": "1886",
   "is_published": true,
   "location": {
      "street": "",
      "zip": "",
      "latitude": 48.886763644968,
      "longitude": 2.2428464993582
      },
  "talking_about_count": 903212,
  "username": "coca-cola",
  "website": "http://www.coca-cola.com",
  "were_here_count": 0,
  "category": "Food/beverages",
  "id": "40796308305",
  "name": "Coca-Cola",
  "link": "https://www.facebook.com/coca-cola",
  "likes": 58345623, 
  "cover": {
     "cover_id": "10152037156953306",
     "source": "http://sphotos-b.ak.fbcdn.net/hphotos-ak-ash4/s720x720/602289_10152037156953306_1443207674_n.jpg",
     "offset_y": 0
  }
}

第二 :您可以通过Facebook的对象喜欢:

https://graph.facebook.com/cocacola/likes?access_token=xxxxxxx

现在我将接受所有扇页,其中“可口可乐”一样,但我需要的所有用户,类似的可口可乐!

莫比其仅与FQL查询可能吗?

Answer 1:

随着FB 2.6 API,你可以得到总喜欢fan_count场。

http://graph.facebook.com/cocacola/?fields=fan_count&access_token= {值}



Answer 2:

Facebook不会给你谁喜欢的网页的用户列表。 你不需要它来创建这个程序。 您可以通过查询公开可用的得到这个数据洞察数据。

该网址将让你这个程序用来创建该图的原始数据:

https://graph.facebook.com/cocacola/insights/page_fans_country?access_token=XXXXXX

你可以使用任何有效信息access_token



Answer 3:

https://graph.facebook.com/cocacola/?fields=fan_count&access_token=#######

你可以得到Facebook页面成员喜欢使用领域fan_count。 但是,你必须通过网页访问令牌,而不是用户的access_token。



文章来源: Graph API how get facebook page members/likes