如何从我的网络应用程序共享的 facebook 图 api 中获取喜欢数?

How to get likes count from facebook graph api which is shared from my web app?

我可以获取分享数和评论数,但无法获取点赞数。 https://graph.facebook.com/?ids=MY_URL 此 API 给出的响应为,

{
  "MY_URL": {
     "share": {
        "comment_count": 0,
        "share_count": 13,
     },
     "id": "MY_URL",
  }
}

同理,我只需要从API获取点赞数/反应数。请帮忙。提前致谢

检查 engagement 字段 - https://developers.facebook.com/docs/graph-api/reference/v3.2/url

它 returns 四个不同的计数器 - comment_count、comment_plugin_count、reaction_count 和 share_count。

reaction_count 将是所有反应的数量(例如,爱,悲伤,...)——这是您在这方面对外部 Open Graph 对象可以获得的尽可能多的“细节”。

Graph API Explorer 中的示例,对象 http://example.com/:

https://developers.facebook.com/tools/explorer?method=GET&path=%3Fids%3Dhttp%253A%252F%252Fexample.com%252F%26fields%3Dengagement&version=v3.2