Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6927901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:06:53+00:00 2026-05-27T11:06:53+00:00

I’m using the twitter gem located here… http://rubydoc.info/gems/twitter/2.0.2 I’m trying to use a method

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:06:54+00:00Added an answer on May 27, 2026 at 11:06 am

    I think you are misunderstanding how this all works. The user never gives you their Twitter username/password. Here’s what happens:

    1. User logs into your website
    2. User clicks the custom “Connect to Twitter” button that you create on your site (which is tied to an authentication gem like OmniAuth.. see this RailsCast for more info: http://railscasts.com/episodes/241-simple-omniauth)
    3. User is taken to Twitter where they login and (hopefully) grant you access to their info
    4. Twitter redirects the user back to your website and passes back a hash of important user data such as the access keys you need to get their information
    5. You save the relevant user information passed back from Twitter so you can access their information

    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:

    # Set all necessary auth info
    Twitter.consumer_key = TWITTER_CONSUMER_KEY_GOES_HERE
    Twitter.consumer_secret = TWITTER_CONSUMER_SECRET_GOES_HERE
    Twitter.oauth_token = current_user.token
    Twitter.oauth_token_secret = current_user.token_secret
    
    # Get the most recent tweets from the Timeline
    most_recent_tweets = Twitter.home_timeline
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.