In a previous article we took an initial look at how a business-oriented community website can benefit from integrating with LinkedIn.com, outlining the steps necessary to utilize the LinkedIn API and OAuth to do this. Now we’ll look more deeply at the achievement of integration and the ability to allow your users to invite LinkedIn members directly to your website. The library that we are using and that we referred to in our previous artcle, is this one.

So, again, this integration task consists of two parts: first, the user must search for a friend whom they wish to invite to your site and then the invitation must be sent.

If your site is a business-oriented community, consider integrating it with LinkedIn.com in order to draw targeted, business-minded visitors and members. Given LinkedIn’s focus on business and technical professionals, it is an excellent potential source of social traffic to your site; simply adding an “invite friends” button from LinkedIn will allow you to draw IT and business specialists directly from LinkedIn to your website.

Talking about “integrating” is one thing; how does one integrate in practice? LinkedIn provides its members with a simple, well-documented API to allow for this and other off-site functions. The OAuth protocol, used by LinkedIn to authorize its account holders, allows you to integrate the content you create on LinkedIn with your website without the need to store the account password locally. While working with OAuth is not necessarily a simple thing, free libraries like this one (that I personally use) exist on the web to make the process an easier one.

The first step is to register your site with LinkedIn; this will in turn provide you with the API key and Secret key, each of which is needed to proceed. The keys are used to authorize users in these steps:

1. First we’ll create a temporary token for the user; this will later be used until a permanent access token is generated: