我正在尝试使用 OAuth gem 在我的 Ruby on Rails 应用程序中验证 Evernote。我正在使用验证 Twitter 的教程 - http://blog.brijeshshah.com/integrate-twitter-oauth-in-your-rails-application/因为我找不到 Evernote 的。
到目前为止,我已经让用户授权我的应用程序,现在有了临时凭据:
customer = OAuth::Consumer.new("xxx", "xxx",{
:site=>"https://sandbox.evernote.com/",
:request_token_path => "/oauth",
:access_token_path => "/oauth",
:authorize_path => "/OAuth.action"})
@request_token = customer.get_request_token(:oauth_callback => "http://localhost:3000/create_evernote_step_2")
session[:request_token] = @request_token.token
session[:request_token_secret] = @request_token.secret
redirect_to @request_token.authorize_url
所以现在我有了 oauth_token 和 oauth_verifier,需要把它们变成访问令牌。Twitter 教程的这一部分似乎是特定于 Twitter 的,所以我现在确定如何处理 Evernote 的情况。谁能帮我吗?