fb login button example

by dmcs

HTML

<html>     
     <head>       
     <title>My Facebook Login Page</title>     
     </head>     
 <body>       
     <div id="fb-root"></div>          
     Hello!   
     
     <div class="fb-login-button">Login with Facebook</div>     
     
     </body>  

</html>

JavaScript

window.fbAsyncInit  = function() {           FB.init({             appId      :  '232894623452511',             status     : true,              cookie      : true,             xfbml      : true,             oauth      : true,            });         };         (function(d){            var js, id =  'facebook-jssdk'; if (d.getElementById(id)) {return;}            js =  d.createElement('script'); js.id = id; js.async = true;             js.src = "//connect.facebook.net/en_US/all.js";             d.getElementsByTagName('head')[0].appendChild(js);           }(document));