Facebook Logout Button is used to break connection between application and Facebook. It is implemented to supports 4 types of command: button, link, image, and auto open on page load. After log out is executed, it is possible to call JavaScript code to execute some action, or define a form on the page to submit.
Facebook Logout Button Images
Following image represents 4 types of Logout Buttons: link, button, button with defined CSS style, and image.
PHP Example
The example shows a code for creating 4 Facebook Logout Buttons from the picture above. The example shows the code for the whole page, but important content is highlighted. Required includes and initialization for any page is highlighted with brown color, and working with Facebook Login Button PHP class is highlighted with blue color.
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <head> <title>Facebook Logout Button PHP example</title> </head> <body> <?php require_once 'facebook.php'; require_once 'faceconn/faceconn.php'; UseGraphAPI(); ?> <form id="form1" > <?php $logout = new LogoutButton(); $logout->SetCommandType("button"); $logout->Render(); $logout->SetCommandType("link"); $logout->Render(); $logout->SetCssClass("blue command_button"); $logout->Render(); $logout->SetImage("images/fblogin.png"); $logout->Render(); ?> </form> </body> </html>
Configuration
Configuration of the Facebook Logout Button PHP class is done through calls of the setter methods, which in turn set the private properties. For Facebook Logout Button PHP class, there are no required properties to set. All you have to do is to create new instance of the class and call Render() method. All properties from the list below are optional.

