So I'm trying to get the oauth authlogic plugin (https://github.com/jrallison/authlogic_oauth) to work on my rails app which already has regular authlogic installed. I believe I've set up everything in accordance with the tutorial but I'm getting this error:
401 Unauthorized
RAILS_ROOT: c:/goldhat_production
Application Trace | Framework Trace | Full Trace
c:/Ruby/lib/ruby/gems/1.8/gems/oauth-0.4.4/lib/oauth/consumer.rb:217:in `token_request'
c:/Ruby/lib/ruby/gems/1.8/gems/oauth-0.4.4/lib/oauth/consumer.rb:139:in `get_request_token'
c:/goldhat_production/vendor/plugins/authlogic_oauth/lib/authlogic_oauth/oauth_process.rb:21:in `redirect_to_oauth'
c:/goldhat_production/vendor/plugins/authlogic_oauth/lib/authlogic_oauth/oauth_process.rb:10:in `validate_by_oauth'
c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:178:in `send'
c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:178:in `evaluate_method'
c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in `call'
c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run'
c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `each'
c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `send'
c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run'
c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in `run_callbacks'
c:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/validations.rb:1098:in `valid_without_callbacks?'
c:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:315:in `valid?'
c:/goldhat_production/app/controllers/users_controller.rb:19:in `create'
I'm pretty much lost here...What am I doing wrong? If any additional information/code is needed for reference I'll provide it.
EDIT:
I'm thinking that the problem is here: I don't have the TOKEN or the SECRET...Where do I get these?
def self.oauth_consumer
OAuth::Consumer.new("TOKEN", "SECRET",
{ :site=>"http://twitter.com",
:authorize_url => "http://twitter.com/oauth/authenticate" })
end
You need to get the token and secret values from the twitter development page, you need to register your application to get these two values then you should be good to go.
Here is a link to the proper twitter page: http://dev.twitter.com/login?redirect_after_login=/apps/new