PHP Class Gajus\Fuss\App

Inheritance: implements Gajus\Fuss\Session
Datei anzeigen Open project: gajus/fuss Class Usage Examples

Public Methods

Method Description
__construct ( integer $app_id, string $app_secret, array $options = [] )
getAccessToken ( ) : Gajus\Fuss\AccessToken Deriving the app access token from the app id and secret.
getId ( ) : integer
getOption ( self::OPTION_VERSION $name ) : mixed
getSecret ( ) : string
getSignedRequest ( ) : null | Gajus\Fuss\SignedRequest
getTopUrl ( ) : string When app is loaded either in Page Tab or Canvas, the top URL is generally not known.
setSignedRequest ( string $signed_request ) : null Designed to be used for a signed request retrieved via the JavaScript SDK.

Private Methods

Method Description
bypassThirdPartyCookie ( ) : null When third party cookies are not accepted, client need to be redirected to the domain that needs to drop the cookies and then back to the original URL.
setOption ( self::OPTION_VERSION $name, mixed $value ) : null

Method Details

__construct() public method

public __construct ( integer $app_id, string $app_secret, array $options = [] )
$app_id integer App ID.
$app_secret string App secret.
$options array

getAccessToken() public method

The access token of this type bypass the access token validation.
See also: https://developers.facebook.com/docs/facebook-login/access-tokens#apptokens
public getAccessToken ( ) : Gajus\Fuss\AccessToken
return Gajus\Fuss\AccessToken

getId() public method

public getId ( ) : integer
return integer

getOption() public method

public getOption ( self::OPTION_VERSION $name ) : mixed
$name self::OPTION_VERSION
return mixed

getSecret() public method

public getSecret ( ) : string
return string

getSignedRequest() public method

public getSignedRequest ( ) : null | Gajus\Fuss\SignedRequest
return null | Gajus\Fuss\SignedRequest

getTopUrl() public method

This is an attempt to reconstruct the top URL with whatever accompanying state data.
public getTopUrl ( ) : string
return string

setSignedRequest() public method

Designed to be used for a signed request retrieved via the JavaScript SDK.
See also: https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus#response_and_session_objects
public setSignedRequest ( string $signed_request ) : null
$signed_request string
return null