图 API 如何获得 Facebook 页面成员/喜欢 [英] Graph API how get facebook page members/likes

查看:20
本文介绍了图 API 如何获得 Facebook 页面成员/喜欢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Facebook 点赞检查

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

<块引用>

我的问题:

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

首先:获取粉丝页面对象,无需访问令牌

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

<代码>{"about": "可口可乐 Facebook 页面收集了您的故事,展示了来自世界各地的人们如何帮助可口可乐成为今天的样子.",签到":146,"描述": "可口可乐于 1886 年在佐治亚州亚特兰大市由 John S. Pemberton 博士创立,最初是在雅各布药房通过将可口可乐糖浆与碳酸水混合而作为喷泉饮料提供的.

可口可乐1887 年获得专利,1893 年注册为商标,到 1895 年,它在美国的每个州和地区都有销售.1899 年,可口可乐公司开始在美国进行特许装瓶业务.

Coca-可乐的起源可能要归功于美国,但它的受欢迎程度使其真正普及.今天,您几乎可以在世界的每个地方找到可口可乐.

Coca-Cola Page House 规则:http://CokeURL.com/q28a","创立": "1886",is_published":真,地点": {街道": "",压缩": "",纬度":48.886763644968,经度":2.2428464993582},talking_about_count":903212,用户名":可口可乐","网站": "http://www.coca-cola.com","were_here_count": 0,"category": "食品/饮料","id": "40796308305","name": "可口可乐","link": "https://www.facebook.com/coca-cola",喜欢":58345623,覆盖": {"cover_id": "10152037156953306","来源": "http://sphotos-b.ak.fbcdn.net/hphotos-ak-ash4/s720x720/602289_10152037156953306_1443207674_n.jpg",偏移_y":0}}

第二:从 facebook 对象获取喜欢:

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

现在我将收到所有cocacola"喜欢的粉丝页面,但我需要所有喜欢可口可乐的用户!

Maby 只能使用 FQL 查询吗?

解决方案

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

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

Facebook like check

I've found an interesting app . This fb-app get all likes from any fanpage and sort it by mass and country!

My question:

how do these app get the data from the graph api ?

First: get the fanpage-object no access token needed

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. 

Coca-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. 

Coca-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.

Coca-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
  }
}

second: get the likes from the facebook object:

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

now i will receive all fan-page which "cocacola" like, but i need all users which like cocacola!

Maby its only possible with FQL Query ?

解决方案

With FB 2.6 API you can get total likes with fan_count field.

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

这篇关于图 API 如何获得 Facebook 页面成员/喜欢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆