Facebook图形API响应大小限制(错误代码1)

Die*_*ito 6 facebook http rate-limiting http-status-code-500 facebook-graph-api

只是分享我在测试我的应用程序时遇到的一些信息.

Facebook Graph API实现了速率限制,如其文档页面所述.今天我试图从CNN facebook页面检索提要,我得到以下500错误:

{"error":{"code":1,"message":"Please reduce the amount of data you're asking for, then retry your request"}}

这是我试图测试的查询:

https://graph.facebook.com/v2.3/5550296508/feed?fields=id,actions,application,caption,created_time,description,from,icon,is_hidden,link,message,message_tags,name,object_id,picture,place,privacy,properties,source,status_type,story,story_tags,to,type,updated_time,with_tags,shares,likes.limit(50),comments.filter(stream).limit(50){attachment,created_time,from,id,like_count,message,message_tags,comments{attachment,created_time,from,id,like_count,message,message_tags}}&access_token=xxxxxxx

Die*_*ito 13

我试图设置不同的limit值来减小尺寸,最终它起作用了.通过检查响应大小并稍微使用它,我发现当响应达到(大致)200k阈值时会抛出错误.

我使用Graph API版本2.3 - 2.4 - 2.5 - 2.6进行了测试

我在facebook API文档中找不到关于此响应大小限制的文档,因此将来可能会更改它.

如果你正在使用他们的API建模一些东西,那么认为分享可能是有用的.