Beispiel #1
0
function ShowLoginButton()
{
    $login = new LoginButton();
    $login->SetPermissions("email");
    $login->SetOnLoginSubmitForm("form1");
    $login->Render();
}
Beispiel #2
0
                                            When you press it, popup window will show up, and you have to enter Facebook credentials. After your successful login, you will be asked to allow the usage of extended permissions for the 
                                            website (this example shows setting of email permission). After confirmation you will be redirected to another page where your basic profile data will be shown. There is
                                            also an option to set JavaScript code which will be executed after successful login.
                                            </p>
                                            <br />
                                            <?php 
// creating new instance of Login Button
$login = new LoginButton();
// Optional: setting text and size
$login->SetText("Sign up with Facebook");
$login->SetSize("small");
// Optional: setting list of extended permissions
$login->SetPermissions("email, publish_stream");
// Optional: setting the form id which will be submitted
// on successfull login (redirect on User Data page)
$login->SetOnLoginSubmitForm("form1");
// Render commmand on the page
$login->Render();
?>
                                        <br /><br />
                                    </div>
                                </form>
                                <br />
                                <?php 
include 'SessionCheck.php';
?>
                                <div style="width:605px">
                                    <center>
                                        <br />
                                        <a href="http://faceconn.com" id="tutorialbtn" runat="server" target="_black"><img src="images/tutorialbutton.png" alt="" /></a>
                                        <a href="http://faceconn.com/facebook-starter-kit-php" target="_black"><img src="images/starterkitsbutton.png" alt="" /></a>