【问题标题】:Twitter API: How to get recent tweets from the users the owner of the profile followsTwitter API:如何从个人资料所有者关注的用户那里获取最近的推文
【发布时间】:2012-12-12 09:37:26
【问题描述】:

我的问题可能看起来有点复杂,但让我澄清一下。使用 Twitter 的 Api 系统,我能够获得特定用户的 20 条最新推文。然而,这并不是我真正想要的。当我正在制作一个 iPhone 应用程序时,用户看到他关注的其他人的最新推文似乎比他自己撰写的推文更有趣。那么,有没有办法从某个特定人关注的用户那里获得 20 条最新的推文?如果问题不够清楚,请告诉我,以便我澄清,谢谢:)

【问题讨论】:

标签: ios4 twitter


【解决方案1】:

您最多可以从用户的关注者那里获得 800 条推文

https://api.twitter.com/1.1/statuses/home_timeline.json

例如,如果您想要 20 条推文,但没有回复,请使用

https://api.twitter.com/1.1/statuses/home_timeline.json?count=20&exclude_replies=true

【讨论】:

    【解决方案2】:

    尝试获取关注者的 ID https://dev.twitter.com/docs/api/1.1/get/followers/ids 应该是这样的... /followers/ids.json?screen_name=xxx 或者可能是 /followers/ids.json?user_id=xxx

    然后,从这些 id 获取推文 https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline

    /statuses/user_timeline.json?screen_name=twitterapi&count=20

    【讨论】:

      猜你喜欢
      • 2017-03-03
      • 1970-01-01
      • 2011-02-25
      • 1970-01-01
      • 1970-01-01
      • 2021-02-27
      • 2014-09-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多