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


i new ruby want create api post tweet twitter without of gem include did on command line 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 use command ouath_signature , post tweet.

as in php did curl want same way ion ruby.

please me out of it

you may use rest-client make api calls. or if don't want use gem also.

try : http://ruby-doc.org/stdlib-2.3.0/libdoc/net/http/rdoc/net/http.html

which comes ruby standard library


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -