如何在不调用每个帖子的评论对象的情况下从墙上的帖子中获取评论计数? [英] How to get comment count from your wall posts without making a call to comments object for each post?

查看:46
本文介绍了如何在不调用每个帖子的评论对象的情况下从墙上的帖子中获取评论计数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

7月10日引入了重大更改;

July 10 breaking changes introduces;

从注释"图形API连接中删除计数" *我们将删除Graph API中注释"连接上未记录的计数"字段.请要求 如果您想要摘要,请显式使用'{id}/comments?summary = true' 包含计数的字段(现在称为"total_count")*

Removing 'count' from 'comments' Graph API connection *We are removing the undocumented 'count' field on the 'comments' connection in the Graph API. Please request '{id}/comments?summary=true' explicitly if you would like the summary field which contains the count (now called 'total_count')*

如果我拉动我/饲料,那么可以肯定的是,注释对象中不再包含计数.但是,如何在不对每个帖子的评论对象进行图形API调用的情况下获得评论计数呢?

If I pull up me/feed, sure enough, count is no longer in the comments object. But how do I get the comment count without resorting to making a graph API call to the comments object on every post?

我对字段扩展不是很好,但是有没有办法让提要包含摘要?

I'm not very good with field expansion, but is there a way to get the feed to include the summary?

推荐答案

在任何地方都没有记录,甚至没有子字段或限制,我在开发人员论坛中发现了这个问题.此调用以自定义格式提取PageID/帖子.就我而言,这是如何在一次通话中获得点赞"计数,分享"计数和评论"计数.

It is not documented anywhere, even subfields or limits, I've found this asking in developers forum. this call pull PageID/posts with custom format. In my case here is how to pull Likes count, shares count and comments count in one call.

PageID/posts?fields=comments.limit(1).summary(true),likes.limit(1).summary(true),shares

我不太确定您是否必须标记同意10月api更改才能获得自定义格式.

I'm not really sure if you have to mark agreed the October api changes in order to get your custom format.

希望这项工作对您有帮助...

hope this work for you...

这篇关于如何在不调用每个帖子的评论对象的情况下从墙上的帖子中获取评论计数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆