Git Product home page Git Product logo

Comments (7)

angelacode avatar angelacode commented on July 28, 2024

Any thoughts on why Ii would be getting a 404 error when looking up based on another ID?

from linkedin.

ryanatwork avatar ryanatwork commented on July 28, 2024

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.

john avatar john commented on July 28, 2024

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:inget'
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:inprofile'
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.

ryanatwork avatar ryanatwork commented on July 28, 2024

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.

john avatar john commented on July 28, 2024

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.

ryanatwork avatar ryanatwork commented on July 28, 2024

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.

john avatar john commented on July 28, 2024

Thanks, that was helpful.

from linkedin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.