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

setApiSecret

SDK Reference › PHP SDK › setApiSecret

Facebook::setApiSecret($app_secret)

Set the app secret that the SDK is currently using. The app secret is associated with the app id, so you should also call setAppId() if you call this method.

Example

// Set a new app secret
$facebook->setApiSecret(“APP_SECRET”);

// If you do above, also set the app id
$facebook->setAppId("APP_ID");

Parameters

Name Description
app_secret The new App secret to use for the SDK.
Updated about 8 months ago
Facebook © 2012 · English (US)
AboutCareersPlatform PoliciesPrivacy Policy