src/Two/LinkedInProvider.php
protected function getBasicProfile($token)
    {
        $url = 'https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))';

        $response = $this->getHttpClient()->get($url, [
            'headers' => [
                'Authorization' => 'Bearer '.$token,
                'X-RestLi-Protocol-Version' => '2.0.0',
            ],
        ]);

        return (array) json_decode($response->getBody(), true);
    }
protected function getBasicProfile($token)
    {
        $url = 'https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))';

        $response = $this->getHttpClient()->get($url, [
            'headers' => [
                'Authorization' => 'Bearer '.$token,
                'X-RestLi-Protocol-Version' => '2.0.0',
            ],
        ]);

        return (array) json_decode($response->getBody(), true);
    }
protected function getBasicProfile ( $ token ) { $ url = 'https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))' ; $ response = $ this -> getHttpClient ( ) -> get ( $ url , [ 'headers' => [ 'Authorization' => 'Bearer ' . $ token , 'X-RestLi-Protocol-Version' => '2.0.0' , ] , ] ) ; return ( array ) json_decode ( $ response -> getBody ( ) , true ) ; }
Get the basic profile fields for the user.

@param  string  $token
@return array
Get the basic profile fields for the user .