Twitter API:获得关注者 +99 [英] Twitter API: Get Followers +99

查看:37
本文介绍了Twitter API:获得关注者 +99的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我要调用用户关注者(状态/关注者),使用 Twitter API(和 OAuth),我只会返回 99 个结果.

Using the twitter API (and OAuth) if i was to call for the user followers, (statuses/followers) i would be returned only 99 results.

有没有办法可以返回 99,然后从关注者 100 开始再次调用,然后循环调用这种调用方式,直到返回关注者总数?

Is there a way i can return 99, then call again starting at follower 100 then looping through this style of calling until the total number of followers has been returned?

或者只是返回所有关注者?

Or just return ALL followers?

推荐答案

您需要按照描述指定游标参数 在 API 文档中.例如.指定 cursor=-1 以请求第一页,然后使用第一个响应中返回的 next_cursor 值:

You need to specify cursor parameter as described in the API documrnation. E.g. specify cursor=-1 to request the first page and then use a next_cursor value returned in the first response:

  http://twitter.com/statuses/followers/barackobama.xml?cursor=-1
  http://twitter.com/statuses/followers/barackobama.xml?cursor=1300794057949944903

这篇关于Twitter API:获得关注者 +99的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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