Want to write api of twitter to post tweet without any gem/library means with curl command

8 views
Skip to first unread message

Paramnoor Singh

unread,
Apr 25, 2016, 3:31:04 AM4/25/16
to Ruby on Rails: Talk

I am new to ruby want to create an api which post tweet to twitter without help of any gem include as we did on command line by running below code:



curl --request 'POST' 'https://api.twitter.com/1.1/statuses/update.json' --data 'status=Maybe+he%27ll+finally+find+his+keys.+%23peterfalk' --header 'Authorization: OAuth oauth_consumer_key="i6baQCTt1sCXAo8YWcKhuly9Z", oauth_nonce="12f94f3e4b2ded3bbfdfe781de60ae73", oauth_signature="x6%2Fi2w%2F0RjN4prcFmA5HthOZU3Q%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1461568353", oauth_token="2291131736-LpQkfe5diMTung5mVQ0Dc5EKA9u8qnIgWuPqau9", oauth_version="1.0"' --verbose





But in controller how can we use this command so it get ouath_signature and post the tweet.

As In php it did with curl want same way ion ruby.

Please help me to get out of it

Reply all
Reply to author
Forward
0 new messages