On 10-08-14 09:20 AM, Tom van der Woerdt wrote:
On 8/14/10 5:22 AM, Rajinder Yadav wrote:
On 10-08-13 08:35 PM, Rajinder Yadav wrote:

I'm not having success with the following code, I get a "Sorry, page
doesn't exist!" webpage. I am using the OAuth v0.4.1 gem.  Your help
and guidance is very appreciated, thanks!

If I type the following out in IRB, it seems to work, but of course I
can't redirect from the shell.

class HomeController<  ApplicationController

   def index
      @consumer = OAuth::Consumer.new( "bLXXXXXXXXI9szbXTJQnXKA",
        { :site=>"https://api.twitter.com/oauth/request_token"; } )


       session[:consumer]      = @consumer
       session[:request_token] = @request_token

       redirect_to @request_token.authorize_url


Hi I found by making the following change I now see the allow/deny page.
However when I click on allow, I do not get redirected back to my
callback page?

@consumer = OAuth::Consumer.new( "bLXXXXXXXXI9szbXTJQnXKA",
        :request_token_path =>  "/oauth/request_token",
        :authorize_path     =>  "/oauth/authorize",
        :access_token_path  =>  "/oauth/access_token",
        :http_method =>  :get ) )

What I am seeing in the pin page, saying:

You've successfully granted access to XXXX_TestApp!
Simply return to XXXX_TestApp and enter the following PIN to complete
the process.

How do I get Twitter to return back to my callback page on my site? My
app type is correctly set to "browser".


Kind Regards,
Rajinder Yadav


You should send theoauth_callback  parameter, as specified by the

Hi Tom,

I have tired sending oauth_callback, made sure that my callback url matches exactly the one specified in twitter app setting, something like this:

redirect_to @request_token.authorize_url + "&oauth_callback=" + CGI.escape("http://myhome.dnydns.org/callback";)

I am testing the site from home using dynamic dns setup, would this be causing the problem? Also in the call to OAuth::Consumer.new, should the http_method be :get or :post ? I've also changed :site=>"https://twitter.com"; to, :site => "https://api.twitter.com"; I'm still not sure what I am doing wrong and I feel like I am chasing my tail!

Kind Regards,
Rajinder Yadav

Reply via email to