API共享计数已弃用Facebook Graph?

问题描述:

从今天开始,当我尝试获取共享计数时,答案是: v2.9及更高版本不建议使用共享字段.

Since today when I try to get the share count the answer is :share field is deprecated for versions v2.9 and higher.

例如: https://graph.facebook .com/?id = https://stackoverflow.com& fields = share

如果没有& fields = share ,则显示json内容,但没有共享值.

Without &fields=share the json content is displayed but without the share value.

我需要从URL获取Facebook的共享计数.

I need to get the share count Facebook from an url.

如果您不想使用访问令牌或nginx代理解决方案,请参见 https://stackoverflow.com/a/45796935/2424880 :

If you do not want use access token or nginx proxy solution, see https://stackoverflow.com/a/45796935/2424880:

您可以使用查询

https://graph.facebook.com?id=<your-url>&fields=og_object{engagement}

答案将是

{
  "og_object": {
    "engagement": {
      "count": 197,
      "social_sentence": "197 people like this."
    },
    "id": "895062470590407"
  },
  "id": "<your-url>"
}