1

我在这一行的回调中收到错误未授权:

request_token.get_access_token(:oauth_verifier => 参数[: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
4

0 回答 0