如何使用Facebook API调用100多个状态? [英] How do I call more than 100 statuses with Facebook API?

查看:88
本文介绍了如何使用Facebook API调用100多个状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个Facebook应用程序,我希望它能够读取过去一年的所有用户状态.进行API调用时,无论将限制设置为什么,我都只能检索前100个状态.

这是我用来拨打电话的网址: > https://graph.facebook.com/me/statuses?limit=100& access_token = ...

当我将限制设置得较低时,它显示的状态更少(证明limit参数起作用).当我将限制设置得更高时,它只给我前100个.当我使用自"时,它仍然只给我100个.

当我使用它提供的下一个" URL时,没有看到前100个状态之外的数据.

我知道,由于诸如我的年处于状态

解决方案

我已经使用Graph API资源管理器验证了分页无法如您所描述的那样工作.将其作为错误记录在Facebook上: https://developers.facebook.com/bugs 并发布错误#在这里.

编辑

每个错误关闭后,<100>按设计是100个限制,您将获得的不止这个数字,这意味着Facebook已做出有意识的商业决定,将其设置为限制要从Graph API中存储,处理和提供服务的数据量.这样做要花钱,而且由于API是免费使用的,所以我不能与他们争论.但是,如果我为此付出代价,那么地狱是的,我会一直踢下去并尖叫.

I'm building a Facebook application and I want it to be able to read all the user's statuses from the past year. When I make the API call, I can only retrieve the first 100 statuses no matter what I set the limit to.

Here's the URL I'm using to make the call: https://graph.facebook.com/me/statuses?limit=100&access_token=...

When I set the limit lower, it shows fewer statuses (proving that the limit argument works). When I set the limit higher, it only gives me the first 100. When I use 'since', it still only gives me 100.

When I use the 'next' url it gives me, I see no data past the first 100 statuses.

I know it's possible to get much more than that because of applications such as My Year In Status

解决方案

I've verified using the Graph API explorer that the pagination is not working as you have described. Log it as a bug with Facebook at: https://developers.facebook.com/bugs and post the bug # here.

EDIT

Per the bug closure, the 100 limit is By Design and you won't get more than that, meaning that Facebook has made a conscious business decision to limit the amount of data it has to store, process, and serve from the Graph API. It costs money to do so and since the API is free to use, I can't argue with them. However, if I was paying for it, then hell yes I kick and scream all the way down the road.

这篇关于如何使用Facebook API调用100多个状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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