我在此行的回调中未获取授权错误:
request_token.get_access_token(:oauth_verifier => params [:oauth_token])
下面的是我的控制器代码:
def new
consumer = Dropbox::API::OAuth.consumer(:authorize)
request_token = consumer.get_request_token
@dropbox_auth = request_token.authorize_url(:oauth_callback => dropbox_callback_url)
end
回调:
def dropbox_callback
consumer = Dropbox::API::OAuth.consumer(:authorize)
request_token = consumer.get_request_token
request_token.get_access_token(:oauth_verifier => params[:oauth_token]) **here is the line where I am getting the error**
client = Dropbox::API::Client.new :token => token, :secret => secret
end