如何在不调用每个帖子的评论对象的情况下从墙上的帖子中获取评论计数?

编程入门 行业动态 更新时间:2024-10-28 00:24:58
本文介绍了如何在不调用每个帖子的评论对象的情况下从墙上的帖子中获取评论计数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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...

更多推荐

如何在不调用每个帖子的评论对象的情况下从墙上的帖子中获取评论计数?

本文发布于:2023-10-23 08:22:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1520304.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:帖子   墙上   情况下   对象   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!