Created
April 30, 2014 17:49
-
-
Save redsquirrel/8b22d6808a1574356d16 to your computer and use it in GitHub Desktop.
Trying (and failing) to use the LinkedIn Search API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'linkedin' | |
client = LinkedIn::Client.new('75abcxm123himom', 'NDwtffWomglylolV') | |
request_token = client.request_token({}, :scope => "r_network") | |
rtoken = request_token.token | |
rsecret = request_token.secret | |
client.authorize_from_access(rtoken, rsecret) | |
p client.search("Grace Hopper") | |
# /Library/Ruby/Gems/2.0.0/gems/linkedin-0.4.7/lib/linked_in/helpers/request.rb:52:in `raise_errors': (403): People search must be done on behalf of a member. (LinkedIn::Errors::AccessDeniedError) | |
# from /Library/Ruby/Gems/2.0.0/gems/linkedin-0.4.7/lib/linked_in/helpers/request.rb:16:in `get' | |
# from /Library/Ruby/Gems/2.0.0/gems/linkedin-0.4.7/lib/linked_in/search.rb:31:in `search' | |
# from play.rb:28:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment