是否有一个rails gem将twitter的推文拉入我可以迭代的对象?

Bla*_*man 3 twitter ruby-on-rails

是否有一个红宝石宝石将拉动所有最近的推文并将其打包成一个漂亮的红宝石对象我可以迭代并在网页上显示?

Jir*_*ong 5

你去吧 - http://twitter.rubyforge.org/

我也在Heroku的插件中使用它.它工作正常.

oauth = Twitter::OAuth.new('consumer token', 'consumer secret')
oauth.authorize_from_access('access token', 'access secret')

client = Twitter::Base.new(oauth)
client.friends_timeline.each  { |tweet| puts tweet.inspect }
Run Code Online (Sandbox Code Playgroud)

然后你可以根据需要显示时间轴.