Skip to content

Instantly share code, notes, and snippets.

@eoneill
Created January 13, 2012 04:04
Show Gist options
  • Save eoneill/1604629 to your computer and use it in GitHub Desktop.
Save eoneill/1604629 to your computer and use it in GitHub Desktop.
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript">
/* Load LinkedIn Data into Form */
function loadData() {
IN.API.Profile('me')
.fields(['id', 'positions', 'educations'])
.result(function(result) {
profile = result.values[0];
console.log(profile);
profHTML = '<a href="' + profile.publicProfileUrl + '">Profile</a>';
for(var i=0;i<profile.positions.length;i++){
profHTML += profile.positions[i];
}
for(var i=0;i<profile.educations.length;i++){
profHTML += profile.educations[i];
}
$('#profile').html(profHTML);
});
}
</script>
<div id="profile"></div>
<script type="IN/Login" data-onAuth="loadData"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment