23

在此处输入图像描述 Facebook喜欢检查

我发现了一个有趣的应用程序。这个 fb 应用程序从任何粉丝页面获得所有喜欢,并按质量和国家分类!

我的问题:

这些应用程序如何从图形 api 获取数据?

第一: 获取 fanpage-object 不需要访问令牌

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 查询才有可能?

4

3 回答 3

28

使用 FB 2.6 API,您可以获得总点赞fan_count数。

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

于 2016-06-07T16:26:11.693 回答
22

Facebook will not give you a list of users who like a page. You don't need this to create this app. You can get this data by querying publicly available insights data.

This URL will get you the raw data this app uses to create this graph:

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

You can get this information with any valid access_token.

于 2013-02-01T01:21:15.517 回答
1

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

您可以使用字段 fan_count 获取 Facebook 页面成员的喜欢。但是您必须传递页面访问令牌而不是用户 access_token。

于 2019-04-01T01:07:52.087 回答