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 7828107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:12:13+00:00 2026-06-02T10:12:13+00:00

i am using omniauth to authenticate a user via twitter. omniauth provides access tokens.

  • 0

i am using omniauth to authenticate a user via twitter. omniauth provides access tokens. now i want to send the get or post request to twitter. i dont want to use any gems. i want to do with net::http.

even in twitter api documentation ! I am not able to find a good tutorial for this

can any one help? thanks

  • 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-06-02T10:12:19+00:00Added an answer on June 2, 2026 at 10:12 am

    Here it is exactly what you need, so, since you’ve got the token and the secret from omniauth, now you are going to use it:

    def prepare_access_token(oauth_token, oauth_token_secret)
      consumer = OAuth::Consumer.new("APIKey", "APISecret", { :site => "https://api.twitter.com", :request_token_path => '/oauth/request_token', :access_token_path => '/oauth/access_token', :authorize_path => '/oauth/authorize', :scheme => :header })
      token_hash = { :oauth_token => oauth_token, :oauth_token_secret => oauth_token_secret }  
      access_token = OAuth::AccessToken.from_hash(consumer, token_hash )
      access_token
    end
    

    Then you, for example, post a tweet:

    msg = {'status' => 'Hey look I can tweet via OAuth!'}
    access_token = prepare_access_token(token, secret)
    response = access_token.post('https://api.twitter.com/1/statuses/update.json', msg, { 'Accept' => 'application/xml' })
    

    Read the article presented on the link for more informations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using omniauth to authenticate a user via twitter, now as mentioned by
I'm using Omniauth to get credentials from Twitter for a specific User. Part of
Currently I authenticate the user using omniauth. This looks like this in my sessions
I'm using Omniauth with Devise to authenticate users via Facebook for a web app
I am using OmniAuth to get access to Facebook in my app. I am
I am using omniauth-twitter gem for user authentication in my rails app. I am
We have a web app running on Rails, using Devise and OmniAuth for user
I've just got into using Omniauth for logging in with Twitter and Facebook and
I am trying to set up an authentication using using omniauth via linkedin. I
I'm writing a Rails app that uses omniauth-facebook to authenticate the user against FB

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.