PHP Class Overtrue\Socialite\Providers\FacebookProvider

Inheritance: extends AbstractProvider, implements Overtrue\Socialite\ProviderInterface
Show file Open project: overtrue/socialite

Protected Properties

Property Type Description
$fields array The user fields being requested.
$graphUrl string The base Facebook Graph URL.
$popup boolean Display the dialog in a popup view.
$scopes array The scopes being requested.
$version string The Graph API version for the request.

Public Methods

Method Description
asPopup ( ) Set the dialog to be displayed as a popup.
fields ( array $fields ) Set the user fields to request from Facebook.
getAccessToken ( string $code ) : AccessToken Get the access token for the given code.

Protected Methods

Method Description
getAuthUrl ( $state )
getCodeFields ( $state = null )
getTokenUrl ( )
getUserByToken ( Overtrue\Socialite\AccessTokenInterface $token )
mapUserToObject ( array $user )
parseAccessToken ( $body )

Method Details

asPopup() public method

Set the dialog to be displayed as a popup.
public asPopup ( )

fields() public method

Set the user fields to request from Facebook.
public fields ( array $fields )
$fields array

getAccessToken() public method

Get the access token for the given code.
public getAccessToken ( string $code ) : AccessToken
$code string
return Overtrue\Socialite\AccessToken

getAuthUrl() protected method

protected getAuthUrl ( $state )

getCodeFields() protected method

protected getCodeFields ( $state = null )

getTokenUrl() protected method

protected getTokenUrl ( )

getUserByToken() protected method

protected getUserByToken ( Overtrue\Socialite\AccessTokenInterface $token )
$token Overtrue\Socialite\AccessTokenInterface

mapUserToObject() protected method

protected mapUserToObject ( array $user )
$user array

parseAccessToken() protected method

protected parseAccessToken ( $body )

Property Details

$fields protected property

The user fields being requested.
protected array $fields
return array

$graphUrl protected property

The base Facebook Graph URL.
protected string $graphUrl
return string

$popup protected property

Display the dialog in a popup view.
protected bool $popup
return boolean

$scopes protected property

The scopes being requested.
protected array $scopes
return array

$version protected property

The Graph API version for the request.
protected string $version
return string