<h1 style="font-size:18px">Facebook Custom Login Button</h1>

                                           <p style="text-align: justify">
                                            CustomLoginButton is used  for the same purpose as LoginButton. Only difference
                                            is that its appearance is not predefined, but it can be defined with CSS. Login Button 
                                            class is used to connect a web site to the Facebook and to allow it to use the Facebook API. 
                                            The example bellow demonstrates login button without style, with defined CSS, as a link, and as an image.

                                            <br /><br />
                                            For all details about the control, with descriptions of all optional properties, please visit:<br />
                                            <b><a href="http://faceconn.com/custom-login-button">Facebook Custom Login Button Tutorial</a></b>.</p>
                                            <br />

                                            <?php 
$login = new CustomLoginButton();
$login->SetCommandText("Connect with Facebook");
$login->SetOnLoginJavaScript("alert('loggin succesfull');");
echo "Login button without CSS styles<br /><br />\n";
$login->Render();
echo "<br /><br /><br />Login button with CSS styles<br /><br />\n";
$login->SetCssClass("blue command_button");
$login->Render();
echo "<br /><br /><br />Login button as link without style<br /><br />\n";
$login->SetCommandType("link");
$login->SetCssClass("");
$login->Render();
echo "<br /><br /><br />Login button as image<br /><br />\n";
$login->SetImage("images/fblogin.png");
$login->Render();
?>
Example #2
0
        $facebookUser = null;
    }
}
// check if user if connected
if (!$facebookUser) {
    echo '<div class="contentdiv" style="height:78px;" id="errorDiv" runat="server" visible="false">';
    echo '    <center>';
    echo '        Application is not yet authorized or connection with Facebook is not established. Press the login button.<br />';
    echo '        <table>';
    echo '            <tr>';
    echo '                <td>';
    echo '                   <img id="animate_arrow" src="images/agt_forward.png" />';
    echo '                </td>';
    echo '                <td style="width:10px" />';
    echo '                <td>';
    $login = new CustomLoginButton();
    $login->SetImage("images/fb-connect-large.png");
    $login->SetOnLoginSubmitForm("form1");
    $login->Render();
    echo '                </td>';
    echo '                <td style="width:75px" />';
    echo '            </tr>';
    echo '        </table>';
    echo '    </center>';
    echo '</div>';
} else {
    echo '<div class="contentdiv" style="height:65px" id="okDiv" runat="server" visible="false">';
    echo '    <table>';
    echo '        <tr>';
    echo '            <td valign="top">';
    echo '                <img src="images/apply.png" alt="" />';