how to get share count on graph api 2.10

前端 未结 2 557
囚心锁ツ
囚心锁ツ 2021-01-21 23:37

In the previous graph api version 2.7 this was working for all count (total, like, comment):

https://graph.facebook.com/v2.7/?fields=id,share,og_object{engageme         


        
2条回答
  •  粉色の甜心
    2021-01-22 00:40

    For all engagement share, like, comments use this query.

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

    Output:

    {
       "id": ,
       "share": {
          "comment_count": 0,
          "share_count": 61
       },
       "og_object": {
          "engagement": {
             "count": 61
          },
          "likes": {
             "data": [
    
             ],
             "summary": {
                "total_count": 0,
                "can_like": false,
                "has_liked": false
             }
          },
          "comments": {
             "data": [
    
             ],
             "summary": {
                "order": "chronological",
                "total_count": 0,
                "can_comment": false
             }
          },
          "id": "975365752527984"
       }
    }
    

提交回复
热议问题