Skip to content

Instantly share code, notes, and snippets.

@rstackhouse
Created June 4, 2012 18:18
Show Gist options
  • Save rstackhouse/2870001 to your computer and use it in GitHub Desktop.
Save rstackhouse/2870001 to your computer and use it in GitHub Desktop.
Tyring to use LinkedIn Gem
require 'rubygems'
require 'linkedin'
client = LinkedIn::Client.new('api_key', 'api_secret')
rtoken = client.request_token.token
rsecret = client.request_token.secret
puts client.request_token.authorize_url
pin = gets
client.authorize_from_request(rtoken, rsecret, pin)
@rstackhouse
Copy link
Author

Edited.

Now I get the following:

C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/oauth-0.4.6/lib/oauth/consume
r.rb:178:in request': additional_authorization_required (OAuth::Problem) from C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/oauth-0.4.6/lib/ oauth/consumer.rb:194:intoken_request'
from C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/oauth-0.4.6/lib/
oauth/tokens/request_token.rb:18:in get_access_token' from C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/linkedin-0.3.7/l ib/linked_in/helpers/authorization.rb:29:inauthorize_from_request'
from authenticate.rb:14:in `

'

@brundage
Copy link

brundage commented Jun 7, 2012

Do you have your api_key and api_secret on line 4? additional_authorization_required is the problem.

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