LinkedIn Page where you define your App and get an API key.

https://www.linkedin.com/secure/developer

Place where u need to have linkedin Login Button:

<script type=”in/Login”></script>

Javascript Used  for LinkedIn Login, where you define the linkedin App(for which you need to login) API Key, the function run on Onload event:

<script type=”text/javascript” src=”http://platform.linkedin.com/in.js”>
api_key: 5FfrZc4k8eeN96ARU1vB-sNogP89zUSsu6T_bMEHL5qUubivfrvj-mTVCvKvjajL
onLoad: onLinkedInLoad
authorize: true
</script>


<script type=”text/javascript”>

//  Runs when the JavaScript framework is loaded

function onLinkedInLoad() {

IN.Event.on(IN, “auth”, onLinkedInAuth);

}

//  Runs when the viewer has authenticated
function onLinkedInAuth() {
IN.API.Profile(“me”).fields(“id”,”firstName”, “lastName”,”industry”)
.result(displayProfiles);
}

// Runs when the Profile() API call returns successfully
function displayProfiles(profiles) {
member = profiles.values[0];
alert(member.id); //  alert to see the member’s id

}
</script>

 

LinkedIn doesn’t provide you the email of the user(member).

//Ajax to check Email Verification is already done or not (ask email from the user)

var reply=confirm(“You are logged in LinkedIn with “+member.firstName+”\n Do you want to SignIn with different user in changethinkers?”);
if (reply==true)
{
window.location=”<cfoutput>#viewstate.getValue(“myself”)#login&NotLogin=0</cfoutput>”
}
else
{
var form = new Element(‘form’,
{method: ‘post’, action: ‘#viewstate.getValue(“myself”)#CheckLinedIn&id=’+member.id});
form.insert(new Element(‘input’,
{name: ‘id’, value: member.id, type: ‘hidden’}));

$(document.body).insert(form);
form.submit();
}

// LinkedIn Logout Event

IN.User.logout();

For more information visit:- https://developer.linkedin.com/documents/javascript-api-tutorial

LinkedIn Login

2 thoughts on “LinkedIn Login

  • July 17, 2014 at 5:09 am
    Permalink

    I see a lot of interesting articles on your page.
    You have to spend a lot of time writing, i know
    how to save you a lot of time, there is a tool that creates unique, SEO friendly posts in couple
    of seconds, just search in google – k2 unlimited content

    Reply
  • August 13, 2017 at 7:25 pm
    Permalink

    Hi admin, i must say you have very interesting articles here.
    Your page can go viral. You need initial traffic only. How to get
    it? Search for; Mertiso’s tips go viral

    Reply

Leave a Reply

Your email address will not be published.