在单个 Graph API 请求中获取 Facebook 发布所有反应计数 [英] Getting Facebook Post all Reactions Count in single Graph API request

查看:26
本文介绍了在单个 Graph API 请求中获取 Facebook 发布所有反应计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于 Facebook 发布了新的反应{NONE, LIKE, LOVE, WOW, HAHA, SAD, ANGRY} 功能,但我无法弄清楚在单个图形 API 请求中获取所有反应计数.

有没有人想出一种方法来在单个请求中获得每个帖子的详细反应?

解决方案

@CBroe 引入的方法似乎使用

一旦检索到一组帖子,就应该能够使用单个请求读取按类型分组的反应计数.请注意,Multiple ID Read Request 模式中 id 的当前限制为 50.

As Facebook released the new reaction{NONE, LIKE, LOVE, WOW, HAHA, SAD, ANGRY} feature for post, but I can not figure out to get all reaction counts in single graph API request.

Has anyone figured out a way to get this detailed reactions per post in single request?

解决方案

The approach introduced by @CBroe appears to be working using Multiple ID Read Requests.

?ids=7175346442_10153799389241443,7175346442_10153799470326443&fields=reactions.type(LOVE).limit(0).summary(total_count).as(reactions_love),reactions.type(WOW).limit(0).summary(total_count).as(reactions_wow),reactions.type(HAHA).limit(0).summary(total_count).as(reactions_haha),...

Screenshot from Facebook Graph API Explorer:

Once a collection of posts is retrieved, one should be able to read reaction counts grouped by type using a single request. Note, the current limit of ids in the Multiple ID Read Request pattern is 50.

这篇关于在单个 Graph API 请求中获取 Facebook 发布所有反应计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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