Php 通过一个查询获取特定Facebook帖子的喜欢、帖子和评论的数量

Php 通过一个查询获取特定Facebook帖子的喜欢、帖子和评论的数量,php,facebook,facebook-graph-api,facebook-php-sdk,posts,Php,Facebook,Facebook Graph Api,Facebook Php Sdk,Posts,我正在使用GraphAPI(PHPSDK)获取特定帖子的共享、喜欢和评论数 现在我正在发送3个api请求以获取这些数字: $post = $facebook->api([post_id_here] . '?summary=1', 'get'); // from this I can get number of shares $likes = $facebook->api([post_id_here] . '/likes?summary=1', 'get'); $com

我正在使用GraphAPI(PHPSDK)获取特定帖子的共享、喜欢和评论数

现在我正在发送3个api请求以获取这些数字:

$post = $facebook->api([post_id_here] . '?summary=1', 'get'); // from this I can get number of shares

$likes = $facebook->api([post_id_here] . '/likes?summary=1', 'get');      

$comments = $facebook->api([post_id_here] . '/comments?summary=1', 'get');
我的问题是,有没有办法通过只发送一个api请求来获取这些信息

我需要减少api调用的数量,因为Facebook对此有限制,而且我在数据库中每天更新的帖子越来越多

批处理调用并不完全是我所需要的,因为它也算作单独的请求


谢谢

是的,您可以使用-
字段

$facebook->api([post_id_here] . '{post-id}?fields=shares,likes,comments', 'get');

谢谢,这正是我需要的。