I’m using the twitter gem located here… http://rubydoc.info/gems/twitter/2.0.2
I’m trying to use a method that requires authentication… Twitter.home_timeline
The rdoc readme file at http://rubydoc.info/gems/twitter/2.0.2/file/README.md states…
Certain methods require authentication. To get your Twitter OAuth credentials, register an app at http://dev.twitter.com/apps
I have this file configured and set up…
Twitter.configure do |config|
config.consumer_key = YOUR_CONSUMER_KEY
config.consumer_secret = YOUR_CONSUMER_SECRET
config.oauth_token = YOUR_OAUTH_TOKEN
config.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET
end
Now what I want, is for a user to come to my app, be able to enter their screen name and password and then see a display of their live stream and all sorts of cool twitter data on their user.
Please help… how do I do this? What method do I use to pass the website visitors username and password?
…ah yes, I am a rails noob so please be gentle.
I think you are misunderstanding how this all works. The user never gives you their Twitter username/password. Here’s what happens:
OmniAuth.. see this RailsCast for more info: http://railscasts.com/episodes/241-simple-omniauth)Now that you went through those steps and you have the user’s necessary access keys (i.e. the token and token secret), you can get their timeline info: