Getting OAuth working

9 views
Skip to first unread message

Rajinder Yadav

unread,
Aug 13, 2010, 3:20:43 PM8/13/10
to Grackle Development
Hi,

I apologize for cross-posting this, but I am desperately looking for
an answer. I am trying to get OAuth working with Twitter. I am not
sure what I am wrong? When I use the code below I get redirected to
the twitter site but am told, 'Sorry, that page doesn’t exist!'

If I type this out in IRB everything seems to look fine. Can some
please tell me what I am doing wrong?

class HomeController < ApplicationController
def index
@consumer = OAuth::Consumer.new( "bLMyOfJI9szbXTJQnXKA",
"y1rCwxIVkaMm41S6SYEy9uYR5oiAUxToPvQUlMd6g9A",
{ :site=>"http://twitter.com/oauth/request_token" } )

@request_token = @consumer.get_request_token

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

redirect_to @request_token.authorize_url
end

end

Kind Regards,
Rajinder Yadav

Rajinder Yadav

unread,
Aug 16, 2010, 3:07:13 AM8/16/10
to Grackle Development
Got things working with a lot of effort and digging around!

Hayes Davis

unread,
Aug 16, 2010, 11:24:23 AM8/16/10
to grac...@googlegroups.com
Rajinder,

Glad you were able to get it resolved - the OAuth gem is a little difficult to use sometimes. If there were any particular issues, tips or tricks relating to your use of Grackle and OAuth, I'd appreciate you sharing them with the list when you have time.

Hayes
Reply all
Reply to author
Forward
0 new messages