Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Is there a ruby 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?

like image 646
Blankman Avatar asked Nov 20 '25 20:11

Blankman


1 Answers

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.

like image 132
Jirapong Avatar answered Nov 23 '25 10:11

Jirapong