Skip to content

Instantly share code, notes, and snippets.

@evernotegists
Created April 4, 2013 20:14
Show Gist options
  • Save evernotegists/5313971 to your computer and use it in GitHub Desktop.
Save evernotegists/5313971 to your computer and use it in GitHub Desktop.
get '/requesttoken' do
callback_url = request.url.chomp("requesttoken").concat("callback")
begin
session[:request_token] = client.authentication_request_token(:oauth_callback => callback_url)
redirect '/authorize'
rescue => e
@last_error = "Error obtaining temporary credentials: #{e.message}"
erb :error
end
@hokuma
Copy link

hokuma commented Apr 22, 2013

I have a problem running this code.

"authentication_request_token" raised an error "undefined method `authentication_request_token".

The list of "client.methods" does not include "authentication_request_token" but it includes "request_token".

I think "reqeust_token" is correct. In fact, I tried "client.request_token" and succeeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment