获得总共喜欢的Facebook应用页面 [英] Getting total likes for facebook app page
问题描述
其中 ID
是应用程序的ID和 ACCESS_TOKEN
是我尝试过的应用程序的当前访问令牌:
-
graph.facebook.com/ID
,它返回应用程序的基本json信息,但不包括喜欢的。 -
graph.facebook.com/ID/likes?access_token=ACCESS_TOKEN
它返回一个空的数据元组,即。{ 数据:[]}
。该页面已被喜欢,当我喜欢该应用程序时,该元组不会更改。
有没有办法从Facebook获得一个应用程序的总喜欢,如果是这样的api通话是什么?
编辑:如果这有助于澄清我正在尝试的页面的网址获得喜欢的是 http://www.facebook.com/apps/application.php?id=ID&sk=PAGE_NAME
它目前不是像页面对象一样容易,它是一个Page对象的参数,但是您可以通过read_insights权限
只需致电 https://graph.facebook.com/ [APP ID] /见解/ page_fans / lifetime /?access_token = ACCESS_TOKEN
示例返回值(删除应用ID):
{
data:[
{
id:[APP ID] / insights / page_fans / lifetime,
name:page_fans,
period: 终身,
值:[
{
value:4,
end_time:2011-07-23T07:00:00 + 0000,
},
{
值:4,
end_time:2011-07-24T07:00:00 + 0000,
},
{
值:4,
end_time: 2011-07-25T07:00:00 + 0000,
},
]
描述:生命周期喜欢你的页面的人总数。 (总计),
},
]
分页:{
上一页:https://graph.facebook.com/[APP ID] /见解/ page_fans /自= = 1311088931& until = 1311348131,
next:https://graph.facebook.com/[APP ID] /见解/ page_fans / lifetime?since = 1311607331& until = 1311866531,
}
}
(在这种情况下,球迷的数量已经是静态的4在过去三天,在繁忙的应用程序,这将波动)
I have a facebook app that I would like to get the total number of "likes" from. I am wondering if this is even possible.
where ID
is the app's id and ACCESS_TOKEN
is the current access token for the app I have tried:
graph.facebook.com/ID
which returns the basic json information for the app but does not include likes.graph.facebook.com/ID/likes?access_token=ACCESS_TOKEN
which returns an empty tuple of data, ie.{"data":[]}
. The page has been liked and this tuple doesn't change when I like the application.
Is there any way to get the total likes for an app from facebook and if so what is the api call?
edit: if it helps to clarify the url for the page that I am trying to get likes from is http://www.facebook.com/apps/application.php?id=ID&sk=PAGE_NAME
It's not currently available as easily as page likes which is a parameter of a Page object , but you can get this from the insights api with the read_insights permission
Just make a call to https://graph.facebook.com/[APP ID]/insights/page_fans/lifetime/?access_token=ACCESS_TOKEN
Sample return value (App ID removed):
{
data: [
{
id: "[APP ID]/insights/page_fans/lifetime",
name: "page_fans",
period: "lifetime",
values: [
{
value: 4,
end_time: "2011-07-23T07:00:00+0000",
},
{
value: 4,
end_time: "2011-07-24T07:00:00+0000",
},
{
value: 4,
end_time: "2011-07-25T07:00:00+0000",
},
]
description: "Lifetime The total number of people who have liked your Page. (Total Count)",
},
]
paging: {
previous: "https://graph.facebook.com/[APP ID]/insights/page_fans/lifetime?since=1311088931&until=1311348131",
next: "https://graph.facebook.com/[APP ID]/insights/page_fans/lifetime?since=1311607331&until=1311866531",
}
}
(In this case the number of fans has been static at 4 for the past three days, on a busier app this will fluctuate)
这篇关于获得总共喜欢的Facebook应用页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!