Python facebook API 关于限制和摘要



https://developers.facebook.com/docs/workplace/custom-integrations/examples有示例:下载.py,在功能:def getFeed(group, name):

其中有一部分:

params = "?fields=permalink_url,from,story,type,message,link,created_time,updated_time,likes.limit(0).summary(total_count),comments.limit(0).summary(total_count)"

likes.limit(0).summary(total_count),comments.limit(0).summary(total_count)是什么意思?
具体来说,limit(0)是什么意思,summary(total_count)是什么意思?

此外,在这个 download.py 中,还有

DEFAULT_LIMIT = "100"# Set to true if you like seeing console output

DEFAULT_LIMIT是什么意思?这是否意味着 100 页或 100 个提要(帖子)?

参数看起来只是一个奇怪编写的获取请求。您可以在代码中看到它像任何其他 get 请求一样发送到服务器,并像 get 请求一样返回文本。

在 get 请求中,你有你的 url ex. youtube.com/watch,问号表示 get 请求,就像参数字符串开头的请求一样。它正在做的是将一个名为字段的变量发送到服务器。

此外,它还附加变量限制(用 & 符号或 & 表示)并将其设置为 100,最后发送"since"变量。

所以,是的。默认限制是指定要获取多少个条目以响应 get 请求。

最新更新