如何通过 Facebook 获取 Facebook 分享数 api

How to get facebook shares count with facebook api

我正在 PHP 编码。我需要制作一个带有 facebook feed 的网站。

我可以点赞和评论:https://graph.facebook.com/?fields=picture,likes.summary(true).limit(0),comments.summary(真).limit(0)&access_token=;

但是我们怎样才能得到股份呢?我试过了:https://graph.facebook.com/?id={url}&fields=engagement&access_token=<>

如果我尝试 facebook url "https://www.facebook.com" ,我有分享的数量,但如何使用我们自己的 facebook post,"https://www.facebook.com/id/posts/post_id" 不工作

我参与了 -> share_count : 0 或者我在 post.

上有 2 股

正如 CBroe 提到的:

https://www.facebook.com/id/posts/post_id is not how you access the actual post via API. You need to use pageid_postid format. And engagement is for Open graph objects, for posts you need to look at the shares field.

使用 ?fields=shares 它的工作