PHP 클래스 Gajus\Fuss\AccessToken

파일 보기 프로젝트 열기: gajus/fuss 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Gajus\Fuss\App $app, string $access_token, self::TYPE_USER | self::TYPE_APP | self::TYPE_PAGE $type )
extend ( ) : null Extend a short-lived access token for a long-lived access token.
getApp ( ) : Gajus\Fuss\App
getCode ( ) : string Get the code for the long-lived access token.
getExpirationTimestamp ( ) : integer
getInfo ( ) : array Fetch info about the access token from Facebook.
getPlain ( ) : string
getScope ( ) : array
isLong ( ) : boolean The issued_at field is not returned for short-lived access tokens.
makeFromCode ( App $app, string $code, string $redirect_url = '' ) : Gajus\Fuss\AccessToken Exchange code for an access token.

비공개 메소드들

메소드 설명
debugToken ( ) : null Populate the access token information using data retrieved from Facebook.

메소드 상세

__construct() 공개 메소드

public __construct ( Gajus\Fuss\App $app, string $access_token, self::TYPE_USER | self::TYPE_APP | self::TYPE_PAGE $type )
$app Gajus\Fuss\App
$access_token string A string that identifies a user, app, or page and can be used by the app to make graph API calls.
$type self::TYPE_USER | self::TYPE_APP | self::TYPE_PAGE

extend() 공개 메소드

Upon successfully extending the token, the instance of the object is updated with the long-lived access token.
또한 보기: https://developers.facebook.com/docs/facebook-login/access-tokens#extending
public extend ( ) : null
리턴 null

getApp() 공개 메소드

public getApp ( ) : Gajus\Fuss\App
리턴 Gajus\Fuss\App $app

getCode() 공개 메소드

Get the code for the long-lived access token.
또한 보기: https://developers.facebook.com/docs/facebook-login/access-tokens#long-via-code
public getCode ( ) : string
리턴 string

getExpirationTimestamp() 공개 메소드

public getExpirationTimestamp ( ) : integer
리턴 integer UNIX timestamp in seconds.

getInfo() 공개 메소드

Fetch info about the access token from Facebook.
public getInfo ( ) : array
리턴 array

getPlain() 공개 메소드

public getPlain ( ) : string
리턴 string The access token as a string.

getScope() 공개 메소드

또한 보기: https://developers.facebook.com/docs/facebook-login/permissions/v2.1
public getScope ( ) : array
리턴 array Permissions granted to the access token.

isLong() 공개 메소드

The issued_at field is not returned for short-lived access tokens.
또한 보기: https://developers.facebook.com/docs/facebook-login/access-tokens#debug
public isLong ( ) : boolean
리턴 boolean

makeFromCode() 공개 정적인 메소드

Exchange code for an access token.
또한 보기: https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/v2.0#exchangecode
public static makeFromCode ( App $app, string $code, string $redirect_url = '' ) : Gajus\Fuss\AccessToken
$app App
$code string The parameter received from the Login Dialog.
$redirect_url string This argument is required and must be the same as the original request_uri that you used when starting the OAuth login process. In case of FB.login, it is empty string.
리턴 Gajus\Fuss\AccessToken