Overtrue\Socialite\Providers\FacebookProvider::getUserByToken PHP Method

getUserByToken() protected method

protected getUserByToken ( Overtrue\Socialite\AccessTokenInterface $token )
$token Overtrue\Socialite\AccessTokenInterface
    protected function getUserByToken(AccessTokenInterface $token)
    {
        $appSecretProof = hash_hmac('sha256', $token->getToken(), $this->clientSecret);
        $response = $this->getHttpClient()->get($this->graphUrl . '/' . $this->version . '/me?access_token=' . $token . '&appsecret_proof=' . $appSecretProof . '&fields=' . implode(',', $this->fields), ['headers' => ['Accept' => 'application/json']]);
        return json_decode($response->getBody(), true);
    }