fConnect - How to set it up

Page 5

Once you have loaded the JavaScript SDK into your page and initialized it with your appId, you simply add the Login Button to your page using the <fb:login-button> XFBML element as shown below:

<html> <head> <title>My Facebook Login Page</title> </head> <body> <div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js"></script> <script> FB.init({ appId:'YOUR_APP_ID', cookie:true, status:true, xfbml:true }); </script> <fb:login-button>Login with Facebook</fb:login-button> </body> </html>

When the user loads the page in their browser, the JavaScript SDK renders the Login Button on your page:


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.