Goodreads Developers discussion
examples / showcase
>
really simple ruby oauth example
date
newest »
newest »
I was following the example at http://www.goodreads.com/api/oauth_ex... 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".



require 'oauth'
key = BLAH #substitute your keys
secret = BLAH
consumer = OAuth::Consumer.new(key, secret, {:site => "http://www.goodreads.com"})
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