php - Linkedin api oauth2.0 get user profile details -


as per new oauth 2.0 linkedin. unable user profile details. have set attributes in app still cant details.

can me code snippet user details.

    public function fetch($method, $resource, $body = '') {     $opts = array(         'http' => array(             'method' => $method,             'header' => "authorization: bearer " .              $_session['oauth_access_token'] . "\r\n" .              "x-li-format: json\r\n"         )     );      $url = 'api.linkedin.com' . $resource;     if (count($this->$params)) {         $url .= '?' . http_build_query($this->$params);     }     $context = stream_context_create($opts);     $response = file_get_contents($url, false, $context);     return json_decode($response); }   $xml_response = $linkedinn->fetch("get","/v1/people/~"); 

please check permissions in code when logging in linked-in. @ link-

https://developer.linkedin.com/support/developer-program-transition


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -