本文介绍了Graph API如何获取Facebook页面成员/喜欢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我发现了一个有趣的应用程序。
这个fb应用程序可以从任何粉丝页面获取所有喜欢的内容,并按大众和国家排序!
I've found an interesting app .This fb-app get all likes from any fanpage and sort it by mass and country!
这些应用程序如何从图形API获取数据?
首先:
获取fanpage-object不需要访问令牌
how do these app get the data from the graph api ?
First:get the fanpage-object no access token needed
{
"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对象获取喜好:
second: get the likes from the facebook object:
现在我将收到所有的cocacola喜欢的粉丝,
,但我需要所有的用户喜欢cocacola!
now i will receive all fan-page which "cocacola" like,but i need all users which like cocacola!
Maby它只能用FQL Query?
Maby its only possible with FQL Query ?
推荐答案
使用FB 2.6 API,您可以通过 fan_count
字段获得总喜欢。
With FB 2.6 API you can get total likes with fan_count
field.
{value}
这篇关于Graph API如何获取Facebook页面成员/喜欢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!