Esempio n. 1
0
function ShowLoginButton()
{
    $login = new LoginButton();
    $login->SetPermissions("email");
    $login->SetOnLoginSubmitForm("form1");
    $login->Render();
}
Esempio n. 2
0
                                            <b>Example:</b><br />
                                            <p style="text-align: justify">
                                            The example demonstrates login button configured with all optional parameters. Below the login button is code used for configuration. Press the login button to see how it works. 
                                            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>
                                    <b>Example:</b><br />
                                    <p style="text-align: justify">
                                    The example demonstrates login button configured with all optional parameters. Below the login button is code used for configuration. Press the login button to see how it works. 
                                    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 instande 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");
// 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();
// show the code example
echo "<br /><br />";
include 'CodeExamples/LoginButtonExample.php';
?>
                                </td>
                            </tr>
                        </table>
                    </form>
                </td>
                <td style="width:20%"></td>