PhP login with linkedin oauth

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saikrishna123
    New Member
    • Feb 2015
    • 1

    PhP login with linkedin oauth

    -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...
    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>
    Last edited by Rabbit; Feb 23 '15, 05:02 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
Working...