facebook - Graph API 如何获取 facebook 页面成员/喜欢

标签 facebook facebook-graph-api facebook-fql

enter image description here Facebook like check

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

My question:

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

首先: 获取粉丝页面对象不需要访问 token

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

最佳答案

使用 FB 2.6 API,您可以通过 fan_count 字段获得总赞数。

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

关于facebook - Graph API 如何获取 facebook 页面成员/喜欢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14632000/

相关文章:

iphone - iPhone 版 Xcode facebook 连接

facebook - 如何使用自动化系统删除所有 Facebook 帖子?

Facebook 图形 API : How do I get “from” field in comment

android - Webview 与 facebook 登录在对话框中闪烁

ios - PFFacebookUtils.logInInBackgroundWithReadPermissions 无法识别的选择器发送到实例

php - Facebook API 中的标签搜索

facebook - 尝试使用 Facebook JS SDK 从 Facebook 注销时,getLoginStatus 返回未知状态

facebook - 使用 Facebook Graph API 从公共(public)页面获取 "Post Count"

Facebook - “IN” 子句中的最大参数数量?

Facebook Graph API FQL 返回的结果少于预期