Search code examples
ruby-on-railsrubytwitter

Display a chosen users tweets using twitter api in a rails app


I am trying to display a chosen users tweets in my rails app. Right now the way I have it, it is pulling up their tweets and any time they are mentioned. I just want the tweets that they post and nothing else. I will not have their log in info. This will just work for public accounts. This is the code I have so far.

client.search([email protected]).take(20).collect do |tweet|

the @band.twitter is where I am storing the bands twitter handle. Any help would be much appreciated.


Solution

  • This seemed to have Worked for me.

    client.user_timeline(@band.twitter).take(20).collect do