我可以使用PHP SDK和使用弃用的rest API获取URL的共享计数,但是没有找到使用图API获取URL的共享计数的方法.
有没有办法找出来?
获得帖子的最佳方式是什么,分享,评论?
我正在尝试通过FQL,但当URL是FB帖子URL时它似乎没有提供任何数据:
SELECT like_count,comment_count,share_count FROM link_stat WHERE url ="https://www.facebook.com/Macklemore/posts/10153256675935268"
当我通过Graph API Explorer获取帖子信息时:
386050065267_10153256675935268
它给了我相同的计数和分享数,我可以通过获得评论计数 386050065267_10153256675935268/comments?summary=true
{
"id": "386050065267_10153256675935268",
"from": {
"category": "Musician/band",
"name": "Macklemore",
"id": "386050065267"
},
"message": "We’re playing a FREE show in November to celebrate the new Microsoft Store opening in Jacksonville, Florida. Come see us! Info here: http://msft.it/STJevent\n\nThursday, November 21, 2013\n10:00 p.m.\nStart lining up for your chance to attend the show on Saturday.\nLocation: Outdoors behind Oakley, near Dick’s Sporting Goods.",
"actions": [
{
"name": "Comment",
"link": "https://www.facebook.com/386050065267/posts/10153256675935268" …Run Code Online (Sandbox Code Playgroud) 以前我使用的是FQL,但是从v2.1开始不推荐使用,我正在使用图形边缘"喜欢"移动到v2.3.
这是我的网址:
https://graph.facebook.com/v2.3/<page_id>/likes?access_token=<access_token>&summary=true
Run Code Online (Sandbox Code Playgroud)
这将返回带有分页信息的详细JSON - 但它省略了当使用Facebook docs中描述的"summary = true"时应该返回的total_count - 你会明白我的意思.
理想情况下,我只想使用javascript客户端脚本执行此操作.如果那是不可能的话,那么我想以这样的方式做到这一点,让服务器完成最少量的工作.
任何帮助表示赞赏.