Facebook Custom Login Button has the same purpose as Facebook Login Button, but while Facebook Login Button has predefined appearance which is rendered on Facebook server, Custom Login Button can be defined by user. It has 4 different types: button, link, image, and auto open on page load. It is possible to set style with CSS.
Login Button Images
Following image represents 4 types of Custom Login Buttons: link, button, button with defined CSS style, and image.
PHP Example
The example shows a code for creating 4 Facebook Custom Login 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. 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 Login Button PHP example</title> </head> <body> <?php require_once 'facebook.php'; require_once 'faceconn/faceconn.php'; UseGraphAPI(); ?> <form id="form1" > <?php $login = new CustomLoginButton(); $login->SetCommandText("Connect with Facebook"); $login->Render(); $login->SetCommandType("link"); $login->Render(); $login->SetCssClass("blue command_button"); $login->Render(); $login->SetImage("images/fblogin.png"); $login->Render(); ?> </form> </body> </html>
Configuration
Configuration of the Facebook Login Button PHP class is done through calls of the setter methods, which in turn set the private properties. For Facebook Login 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.

