facebook graph API endpoint for getting “likes, shares, comments” for post(s)

后端 未结 4 1789
长情又很酷
长情又很酷 2021-01-31 19:26

Facebook is planning to drop support for FQL after V2.0 https://developers.facebook.com/docs/apps/changelog/#v2_0_fql

The below task could be done easily with FQL

4条回答
  •  感动是毒
    2021-01-31 19:52

    The field shares does not need the .summary(true) at the end. It will bring always the total. But the likes and comments does need .summary(true)

    Example:

    [POST_ID]?fields=shares,likes.summary(true),comments.summary(true)

    Improved version works with Graph Api v2.11 (add limit(0) to removes lists of likes and comments and get only summary data):

    [POST_ID]?fields=shares,likes.summary(true).limit(0),comments.summary(true).limit(0)

    This will bring the total count of shares, comments and likes.

    You may have a access_token with an read_stream permission to get the shares count.

提交回复
热议问题