How to Integreate your site with Linked in Apis using Java ?

In a few simple steps, you can start building LinkedIn into your site:

1. Request an API Key . You need to add your application by login into https://www.linkedin.com/secure/developer

Application details preview looking like this:


2.Understand the OAuth Flow daigram:


Fore more details about how to request,authorize,access the token look at documentation @ http://developer.linkedin.com/docs/DOC-1008

3. Download the Beta OAuth Signpost code: click here to download

4.After extracting above zip file,Edit LinkedInAuthentication.java and modify Your LINKEDIN_API_KEY,LINKEDIN_SECRET_KEY generated at first step.

5.Compile above sources by keeping commons-codec-1.3.jar,signpost-core-1.1-SNAPSHOT.jar in classpath.

6.Setup JEE web structure and deploy it on J2EE Web/App Server

7.Open browser and send request to url: http://localhost:8080/YOUR_DOC_ROOT/logon/

8.Above url will call LogonServlet servlet,it will ask you to Grant your application access to your Linkedin account by signing in:

9. If your username | password valid,then it allows you to show XML responses ,you can further use these details to your application.


If you need extra information like,Company,industry,educaiton,no-of-recommands,current status etc., you need to pass it to your url eg:

i. http://localhost:8080/linkedin/api/v1/people/~:(id,first-name,last-name,industry)

ii. http://localhost:8080/linkedin/api/v1/people/~:(id,first-name,last-name,headline,picture-url,industry,location,num-recommenders,current-status,educations,site-standard-profile-request)

iii. http://localhost:8080/linkedin/api/v1/url=public-profile-url


Check it here for more profile fields: http://developer.linkedin.com/docs/DOC-1061