开发者

Is there a rails gem that pulls tweets from twitter into a object I can iterate?

开发者 https://www.devze.com 2023-01-30 16:01 出处:网络
Is there a r开发者_StackOverflow社区uby gem that will pull all recent tweets and pack it into a nice ruby object I can just iterate from and display on a web page?Here you go - http://twitter.rubyforg

Is there a r开发者_StackOverflow社区uby gem that will pull all recent tweets and pack it into a nice ruby object I can just iterate from and display on a web page?


Here you go - http://twitter.rubyforge.org/

I use this with my plugin on Heroku as well. It is working fine.

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 }

then you can just display a timeline as you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号