This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

My code requires username to be populated (and ideally email, however I now understand that email is not available via the LinkedIn API - yuck - I will need to ask the user for it. I do, however, need username but it is null.

Why isn't fetchUserProfile returning a unique id (for example id from the LinkedInProfile) in username? I really need a unique identifier to work with.

Ultimately, I am trying to get this line below to work right in the SignupController from the sample code I linked to above.

The 'id' property is a unique identifier for that user. Is this not what you need? Or were you looking for the user's login name?

If you're looking for the user's login name, then that's their email address. You can't get that from LinkedInProfile, but you *can* get it. You'll need to (1) make sure you authorize with "r_emailaddress" in the scope and (2) call linkedIn.profileOperations().getProfileFullById(). The LinkedInProfileFull object will have the email address in it.

Comment

You should be able to get the email address if you're using the latest 1.0.0.BUILD-SNAPSHOT build. Be aware, however, that using this build will shift you from using LinkedIn's API via OAuth 1.0a authorization to using it via their OAuth 2 authorization.