Ruby on rails 401使用authlogic oauth时出错

Ruby on rails 401使用authlogic oauth时出错,ruby-on-rails,oauth,authlogic-oauth,Ruby On Rails,Oauth,Authlogic Oauth,所以我正在尝试获取oauth authlogic插件(https://github.com/jrallison/authlogic_oauth)在已经安装了常规authlogic的rails应用程序上工作。我相信我已经按照教程设置了所有内容,但我遇到了以下错误: 401 Unauthorized RAILS_ROOT: c:/goldhat_production Application Trace | Framework Trace | Full Trace c:/Ruby/lib/ruby/

所以我正在尝试获取oauth authlogic插件(https://github.com/jrallison/authlogic_oauth)在已经安装了常规authlogic的rails应用程序上工作。我相信我已经按照教程设置了所有内容,但我遇到了以下错误:

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'
我在这里迷路了…我做错了什么?如果需要任何其他信息/代码作为参考,我会提供

编辑:

我想问题就在这里:我没有代币或秘密……我从哪里得到这些

 def self.oauth_consumer
      OAuth::Consumer.new("TOKEN", "SECRET",
      { :site=>"http://twitter.com",
        :authorize_url => "http://twitter.com/oauth/authenticate" })
  end

您需要从twitter开发页面获取令牌和秘密值,您需要注册应用程序以获取这两个值,然后您就可以开始了

以下是正确twitter页面的链接:

您需要从twitter开发页面获取令牌和秘密值,您需要注册应用程序以获取这两个值,然后就可以开始了

以下是正确twitter页面的链接: