Facebook 图-api 获取 link 统计数据
Facebook graph-api get link stats
我正在使用 fql 来获取 link 这样的统计数据:
https://graph.facebook.com/fql?access_token={token}&q="SELECT share_count, like_count, comment_count, click_count,url FROM link_stat WHERE url=http://someUrl.com"
响应是:
{
"data": [
{
"share_count": 1,
"like_count": 2,
"comment_count": 1,
"click_count": 0,
"url": "http://someUrl.com"
}
]
}
所以因为 fql 已被弃用,所以我需要使用 graph-api 来完成此操作,但我没有找到任何可以完成这项工作的东西。有URL图-api:
https://developers.facebook.com/docs/graph-api/reference/v2.5/url/
我试过这个:
https://graph.facebook.com/v2.5/?access_token={token}&id=http://someUrl.com&fields=id,og_object{engagement},share
对于相同的 Link 响应是:
{
"id": "http://someUrl.com",
"og_object": {
"engagement": {
"count": 3,
"social_sentence": "3 people like this."
},
"id": "878377855594880"
},
"share": {
"comment_count": 0,
"share_count": 3
}
}
所以有几个问题:
没有returnclick_count
没有returnlike_count(engagement.count下有值)。关于文档,这应该是喜欢的数量。但是该值不正确,正如您从我的 FQL 响应中看到的那样 "like_count=2" 什么是正确的,但是在图中 API "engagement.count=3" 所以它不正确。
comment_count return 根据图 api 编辑的不正确。它说 0 条评论,但正如您从 FQL 响应中看到的那样,它有 1 条评论什么是正确的
share_count return 根据图表 api 编辑的不正确。它说 3 股,但正如您从 FQL 响应中看到的那样,它有 1 股是正确的。
那么有什么方法可以用图表 API 获得相同的结果(正确的结果),就像我通过 FQL 调用获得它们一样。
我发现没有 fql 的唯一解决方案是 FB Rest API,像这样:
https://api.facebook.com/method/links.getStats?urls="http://someUrl.com"&format=json
但是这个也被弃用了。
很遗憾,您目前无法使用 graph-api 实现此功能。我偶然发现了同样的问题,而且 facebook 方面似乎存在问题。
错误在 2 月报告并标记为 "Bug Confirmed"。修复仍在进行中。
要检查状态,请单击 here。
我正在使用 fql 来获取 link 这样的统计数据:
https://graph.facebook.com/fql?access_token={token}&q="SELECT share_count, like_count, comment_count, click_count,url FROM link_stat WHERE url=http://someUrl.com"
响应是:
{
"data": [
{
"share_count": 1,
"like_count": 2,
"comment_count": 1,
"click_count": 0,
"url": "http://someUrl.com"
}
]
}
所以因为 fql 已被弃用,所以我需要使用 graph-api 来完成此操作,但我没有找到任何可以完成这项工作的东西。有URL图-api:
https://developers.facebook.com/docs/graph-api/reference/v2.5/url/
我试过这个:
https://graph.facebook.com/v2.5/?access_token={token}&id=http://someUrl.com&fields=id,og_object{engagement},share
对于相同的 Link 响应是:
{
"id": "http://someUrl.com",
"og_object": {
"engagement": {
"count": 3,
"social_sentence": "3 people like this."
},
"id": "878377855594880"
},
"share": {
"comment_count": 0,
"share_count": 3
}
}
所以有几个问题:
没有returnclick_count
没有returnlike_count(engagement.count下有值)。关于文档,这应该是喜欢的数量。但是该值不正确,正如您从我的 FQL 响应中看到的那样 "like_count=2" 什么是正确的,但是在图中 API "engagement.count=3" 所以它不正确。
comment_count return 根据图 api 编辑的不正确。它说 0 条评论,但正如您从 FQL 响应中看到的那样,它有 1 条评论什么是正确的
share_count return 根据图表 api 编辑的不正确。它说 3 股,但正如您从 FQL 响应中看到的那样,它有 1 股是正确的。
那么有什么方法可以用图表 API 获得相同的结果(正确的结果),就像我通过 FQL 调用获得它们一样。
我发现没有 fql 的唯一解决方案是 FB Rest API,像这样:
https://api.facebook.com/method/links.getStats?urls="http://someUrl.com"&format=json
但是这个也被弃用了。
很遗憾,您目前无法使用 graph-api 实现此功能。我偶然发现了同样的问题,而且 facebook 方面似乎存在问题。 错误在 2 月报告并标记为 "Bug Confirmed"。修复仍在进行中。
要检查状态,请单击 here。