Comments (7)
Any thoughts on why Ii would be getting a 404 error when looking up based on another ID?
from linkedin.
This works for me, maybe the latest version of the gem fixes the issue?
You can only display the profile from an ID for people in your LinkedIn Network
from linkedin.
This fails for me too, using the latest version of the gem. I can't get my own profile when authed as myself, so it doesn't appear to be a network issue. I can get profiles fine by :url.
Here's the top of the stack trace in the console:
ruby-1.9.3-rc1 :011 > pro = client.profile( :id => "r3TugUrYus" )
LinkedIn::Errors::NotFoundError: (404): Not Found
from /Users/john/.rvm/gems/ruby-1.9.3-rc1@rails31/bundler/gems/linkedin-2e35630343ae/lib/linked_in/helpers/request.rb:51:in raise_errors' from /Users/john/.rvm/gems/ruby-1.9.3-rc1@rails31/bundler/gems/linkedin-2e35630343ae/lib/linked_in/helpers/request.rb:16:in
get'
from /Users/john/.rvm/gems/ruby-1.9.3-rc1@rails31/bundler/gems/linkedin-2e35630343ae/lib/linked_in/api/query_methods.rb:37:in simple_query' from /Users/john/.rvm/gems/ruby-1.9.3-rc1@rails31/bundler/gems/linkedin-2e35630343ae/lib/linked_in/api/query_methods.rb:8:in
profile'
from (irb):11
from /Users/john/.rvm/gems/ruby-1.9.3-rc1@rails31/gems/railties-3.1.1/lib/rails/commands/console.rb:45:in `start'
from linkedin.
I can't replicate this issue - make sure you are using the correct LinkedIn profile id. If I use that ID In the example above I get a 404 also, that may not be the correct LinkedIn ID. The ID is not part of the default profile fields, however you can get it if you add it to the default profile fields.
[11] pry(main)> client.profile(:id=>"lkUnrbyLgY")
=> {"first_name"=>"Ryan",
"headline"=>"Fellow at Code for America",
"last_name"=>"Resella",
from linkedin.
Thanks much for responding. You're right--I was using the 'uid' value I get back from omniauth, which I presumed to be the member id. But when I use your gem to get my own info via public URL ( client.profile(:url => "http://www.linkedin.com/in/jmcgrath") ), I get back a different id value, which does work.
Bit off topic and unrelated to my (non) issue, but if anyone knows how to get the Linkedin member id from an omniauth Linkedin uid, I'd be very, very grateful.
from linkedin.
I'm actually using the uid in this rails app, even though I wrote it to implement the LinkedIn ID maybe it will help -
https://github.com/codeforamerica/FellowsExchange/blob/master/app/models/user.rb
from linkedin.
Thanks, that was helpful.
from linkedin.
Related Issues (20)
- Segmentation fault when used in parallel threads HOT 8
- Linkedin Group Share HOT 2
- Normal Pagination
- LinkedIn API changes HOT 1
- Documentation Links No Longer Work HOT 5
- token_secret is not passed HOT 2
- LinkedIn API returns Positions without Title HOT 6
- Does the API has stopped providing Connections HOT 3
- (400): 'submitted-url' and 'media-key' can not be both empty HOT 6
- LinkedIn API session issue HOT 1
- List of all companies where authenticated user is the Admin HOT 1
- Setting the linkedin pin at the run time HOT 1
- Unable to find client.profile for authenticated user HOT 3
- NameError: uninitialized constant Api::QueryHelpers HOT 1
- Is this gem still maintained? HOT 1
- Application does not respond after sharing content to company page HOT 1
- UnauthorizedError in callback HOT 2
- problems with the access token HOT 2
- LinkedIn v1 API deprecation HOT 11
- Incorrect tag for v1.1.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linkedin.