Hel*_*ope 3 facebook facebook-like facebook-graph-api facebook-social-plugins
我在页面上删除的"Likes"插件显示了直接点击按钮的次数,以及页面URL已被共享或Like已被评论的次数.
当我使用Graph API检查我的对象时,它只显示直接"赞"点击的数量.这是一个示例对象:
{
"id": "17678692xxxxxxx",
"name": "The Dali Lama Returns",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/161984_176786925772923_6855xxxxxxx.jpg",
"link": "http://mysite.com/8/the-dali-lama-returns",
"likes": 1,
"app_id": 478xxxxxxx,
"category": "Unknown",
"is_published": true,
"description": "The Dali Lama will speak, and we will listen.",
"about": "The Dali Lama will speak, and we will listen.",
"can_post": true
}
Run Code Online (Sandbox Code Playgroud)
这意味着在某人点击我的喜欢按钮并写了类似的评论后,该按钮将显示计数"2",但我的对象将只显示一个计数.
有没有办法获得按钮在我的页面上显示的完整"赞"计数?
Hel*_*ope 11
我找到了两种方法.使用图形api的新方法似乎是使用fql,如下面的请求所示:
https://graph.facebook.com/fql?q=SELECT url, normalized_url, share_count, like_count, comment_count, total_count, commentsbox_count, comments_fbid, click_count FROM link_stat WHERE url='http://mysite.com/8/the-dali-lama-returns'
Run Code Online (Sandbox Code Playgroud)
旧方法,Rest API正在被弃用:
link.getStats()
Run Code Online (Sandbox Code Playgroud)
https://developers.facebook.com/docs/reference/rest/links.getStats/
| 归档时间: |
|
| 查看次数: |
10321 次 |
| 最近记录: |