views:

438

answers:

2

I'm currently trying to use this gem http://github.com/pengwynn/linkedin. Everything works fine (i.e. authentication and calling the method which gets the profile), except that the profile object only contains the first name and the last name.

I'm trying to get my own profile info through the api, so the necessary information is there.

Thank you

A: 

By design, the LinkedIn api does not give you the person's email address. (Unlike the Google oauth api).

What you can get from the LinkedIn api is information about the person's connections (friends) and more. See overview. Their profile api

Added: could be that the Rails LinkedIn gem does not yet expose all of the LinkedIn Profle api. That api has changed relatively recently. It may be that you'll need to find another gem or write you own sw to do it. Check on the LinkedIn api forum

Larry K
A: 

I just found out that in order to get more info rather that first name and last name, one needs to pass in the :fields param specifying the desired fields.

http://tinyurl.com/yl3ldv2

Example from the site:

# get a profile for someone found in network via ID
client.profile(:id => 'gNma67_AdI', :fields => %w(first-name, last-name, headline, positions, education))
cristian