Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
  • Games
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • JavaScript
  • PHP
  • More SDKs
  • Facebook Object
    • api
    • getAccessToken
    • getApiSecret
    • getAppId
    • getLoginStatusUrl
    • getLoginUrl
    • getLogoutUrl
    • getSignedRequest
    • getUser
    • setAccessToken
    • setApiSecret
    • setAppId
    • setFileUploadSupport
    • useFileUploadSupport
  • FacebookApiException
    • getResult
    • getType

getLogoutUrl

Facebook::getLogoutUrl( $params=array() )

This method returns a URL that, when clicked by the user, will log them out of their Facebook session and then redirect them back to your application.

Example

$params = array( 'next' => 'https://www.myapp.com/after_logout' );

$facebook->getLogoutUrl($params); // $params is optional. 

Parameters

This method takes an optional $params array containing the following key and value pairs:

Name Description
next (optional) Next URL to which to redirect the user after logging out (should be an absolute URL).
Updated over a year ago
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy