Facebook Developers
DocumentationSupportBlogAppsLog In
  • Getting Started
  • Core Concepts
  • Advanced Topics
  • SDK Reference
    • JavaScript SDK
    • PHP SDK
    • iOS SDK
    • Android SDK
  • Tools
  • Downloads
    • Download the PHP SDK
  • Facebook Object
    • api
    • getAccessToken
    • getApiSecret
    • getAppId
    • getLoginStatusUrl
    • getLoginUrl
    • getLogoutUrl
    • getSignedRequest
    • getUser
    • setAccessToken
    • setApiSecret
    • setAppId
    • setFileUploadSupport
    • useFileUploadSupport
  • FacebookApiException
    • getResult
    • getType

getAccessToken

SDK Reference › PHP SDK › getAccessToken

Facebook::getAccessToken()

Get the current access token being used by the SDK. This may be a user access token or an application access token. See the permissions page for more information on access tokens.

Example

// Get the current access token
$access_token = $facebook->getAccessToken();

Parameters

None.

Updated about 8 months ago
Facebook © 2012 · English (US)
AboutCareersPlatform PoliciesPrivacy Policy