Is there a rail gem that pulls tweets from twitter into an object that I can repeat?

Is there a ruby ​​pearl that pulls out all the latest tweets and packs it into a nice ruby ​​object that I can just iterate over and display on a web page?

+3
source share
1 answer

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

I use this with my Heroku plugin. 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 }

you can simply display the timeline as you wish.

+5
source

Source: https://habr.com/ru/post/1780144/


All Articles