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

setAppId

SDK Reference › PHP SDK › setAppId

Facebook::setAppId($app_id)

Set the app id that the SDK is currently using. You should also call setApiSecret() if you call this method.

Example

// Set a new app id to use
$facebook->setAppId(“APP_ID”); 

// If you do the above, also set a new app secret
$facebook->setApiSecret(“APP_SECRET”); 

Parameters

Name Description
app_id The new app id to use.
Updated about 8 months ago
Facebook © 2012 · English (US)
AboutCareersPlatform PoliciesPrivacy Policy