根据https://developers.facebook.com/docs/graph-api/using-graph-api/v2.0,
Some edges have an upper maximum on the limit value, for performance reasons. We will return the correct pagination links if that happens.
最近对https://graph.facebook.com/20531316728/feed?limit=500&access_token=CAACE的回复...是
{
"error": {
"message": "(#100) The 'limit' parameter should not exceed 250",
"type": "OAuthException",
"code": 100
}
}
但是(如文档所述)某些端点允许limit=500
。响应的错误代码为100
,错误类型为OAuthException
,但该消息却说明了不同的故事。有什么好方法可以检测到HTTP 400错误请求响应是否因为限制参数?