Goodreads Developers discussion

examples / showcase > really simple ruby oauth example

Comments (showing 1-3 of 3) (3 new)    post a comment »
dateDown arrow    newest »

message 1: by Michael (last edited Jul 31, 2012 02:24PM) (new)

Michael Economy (michaeleconomy) #example authenticates and prints the raw xml for the friend updates.
require 'oauth'
key = BLAH #substitute your keys
secret = BLAH

consumer =, secret, {:site => ""})
request_token = consumer.get_request_token
p request_token.authorize_url

#user needs to go to this url and approve it

access_token = request_token.get_access_token
p access_token.get("/updates/friends.xml").body

message 2: by Chris (new)

Chris (chrisnolanca) | 9 comments I was following the example at in irb which seems to have come out of this post.

I ran into an error (OAuth::VERSION not defined) and it seems that the require "oauth/consumer" should just be require "oauth".

message 3: by Michael (new)

Michael Economy (michaeleconomy) I've put the require in that example, thanks Chris.

back to top

unread topics | mark unread