-1 down vote favorite
1
Hii im doing linkedin oauth sign in using php. Im struck at getting details like phone number and date of birth from linkedin account.Im getting all other details.
please give me a solution for extracting phne number and date of birth. my code is below...
1
Hii im doing linkedin oauth sign in using php. Im struck at getting details like phone number and date of birth from linkedin account.Im getting all other details.
please give me a solution for extracting phne number and date of birth. my code is below...
Code:
<pre>
$response = $OBJ_linkedin->profile('~:(id,first-name,last-name,picture-url,email-address,date-of-birth)');
$result = new SimpleXMLElement($response['linkedin']);
$_SESSION['passcode'] = $result->id;
$_SESSION['fname'] = $result->{'first-name'};
$_SESSION['lname'] = $result->{'last-name'};
$_SESSION['email'] = $result->{'email-address'};
$_SESSION['phn'] = $result->{'phone-numbers'};
$_SESSION['dob'] = $result->{'date-of-birth'};
echo $_SESSION['phn'];
echo $_SESSION['dob'];
$_SESSION['pic'] = $result->{'picture-url'};
</pre>