2016-05-13 93 views
0

我正在寻找一种方法来获取使用Facebook图形API的帖子(不是网址)的股份数量。我能够使用FQL做到这一点,但看到它将在八月份之前被删除,我正在寻找一种非缺陷的方式来做到这一点。如何从Facebook Graph API获取份额?

我是新来的,非常感谢任何帮助。我在python上使用图形API。

我看到以下页面:

  1. How to get share counts using graph API

  2. Can i get lots of share counts using facebook graph API? And how to do it

  3. Using Facebook Graph API 2.2 to get like and share count

  4. How to get facebook share, like, comment count for a url with graph api only (in a non-deprecated way)

但是,我找不到适合我的方法。请帮忙。

回答

1

看一看我的答案在

你应该能够调用

/?fields=id,share,og_object{engagement{count},likes.summary(true).limit(0),comments.limit(0).summary(true)}&id=http://www.google.com 

其返回类似

{ 
    "id": "http://www.google.com", 
    "share": { 
    "comment_count": 2, 
    "share_count": 31135003 
    }, 
    "og_object": { 
    "engagement": { 
     "count": 31135003 
    }, 
    "likes": { 
     "data": [ 
     ], 
     "summary": { 
     "total_count": 87935, 
     "can_like": true, 
     "has_liked": false 
     } 
    }, 
    "comments": { 
     "data": [ 
     ], 
     "summary": { 
     "order": "chronological", 
     "total_count": 1323, 
     "can_comment": true 
     } 
    }, 
    "id": "381702034999" 
    } 
} 
+0

感谢p ointer –