2016-05-13 88 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 –