Login/ Register With Linked In

social media

This article will guide you to crate login/ register with linked in.


Please include linkedin_function.php file to your login/register page. You will get the file file from the attached zip file.
You need change your api key and application secrete in linkedin_function.php file. Please follow the following steps to create your own api key and application secrete. Simply go to https://www.linkedin.com/secure/developer and Click on Add new Application, then fill up the form. The system will provide you the api key and applicatin secret. Replace both in linkedin_function.php file.


Please insert the following code to display the linked in connect button.

<form id="linkedin_connect_form" action="<?php echo $_SERVER['PHP_SELF'];?>" 
<input type="hidden" name="<?php echo LINKEDIN::_GET_TYPE;?>" 
id="<?php echo LINKEDIN::_GET_TYPE;?>" value="initiate" />
<input type="submit" value="Connect to LinkedIn" name="linkedin" />

When the user clicks on "Connect to LinkedIn Button" it will take the user to linked in login page. If the user logged in successfully to LinkedIn then the system will return back to your login page. Here you can get user's LinkedIn id, first name and last name.

$_SESSION['oauth']['linkedin']['authorized'] = 
(isset($_SESSION['oauth']['linkedin']['authorized'])) ? 
$_SESSION['oauth']['linkedin']['authorized'] : FALSE;
if($_SESSION['oauth']['linkedin']['authorized'] === TRUE) {
$OBJ_linkedin = new LinkedIn($API_CONFIG);

$response = $OBJ_linkedin->profile('~:(id,first-name,last-name,picture-url)');
$result = new SimpleXMLElement($response['linkedin']);
$_SESSION['passcode'] = $result->id; 
$_SESSION['fname'] = $result->{'first-name'};
$_SESSION['lname'] = $result->{'last-name'};

Download the complete login/ registration system from the following location.

Other Login/ Registration Systems

Login/ Register With Facebook
Login/ Register With Twitter
Login/ Register With Yahoo!
Login/ Register With Gmail
Login/ Register With Hotmail
Login/ Register With Email

Download Code Files Total Downloads: 4217

16 November
comments powered by Disqus