From 7eeb0e307f2f7b9063bbcffbea3213b7b31bdfdc Mon Sep 17 00:00:00 2001 From: Howard Yeh Date: Wed, 22 Dec 2010 10:12:09 +0800 Subject: [PATCH] change README to reflect the fact that oauth_callback is mandatory, otherwise oob is used by default --- README.rdoc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.rdoc b/README.rdoc index 909ae555..d49ec551 100644 --- a/README.rdoc +++ b/README.rdoc @@ -20,15 +20,19 @@ As a matter of fact it has been pulled out from an OAuth Rails Plugin http://cod == Demonstration of usage +We need to specify the oauth_callback url explicitly, otherwise it defaults to "oob" (Out of Band) + + @callback_url = "http://127.0.0.1:3000/oauth/callback" + Create a new consumer instance by passing it a configuration hash: @consumer = OAuth::Consumer.new("key","secret", :site => "https://agree2") Start the process by requesting a token - @request_token = @consumer.get_request_token + @request_token = @consumer.get_request_token(:oauth_callback => @callback_url) session[:request_token] = @request_token - redirect_to @request_token.authorize_url + redirect_to @request_token.authorize_url(:oauth_callback => @callback_url) When user returns create an access_token