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

getLogoutUrl

SDK Reference › PHP SDK › 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 about 8 months ago
Facebook © 2012 · English (US)
AboutCareersPlatform PoliciesPrivacy Policy