Advertisement
daowala

Untitled

Apr 9th, 2013
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.39 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html xmlns:fb="https://www.facebook.com/2008/fbml">
  3.     <head>
  4.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  5.         <title>Facebook Like To Download</title>
  6.         <script src="//connect.facebook.net/en_US/all.js"></script>
  7.        
  8.     </head>
  9.     <body >
  10. <div id="fb-root"></div>
  11. <script>
  12.   window.fbAsyncInit = function() {
  13.     // init the FB JS SDK
  14.     FB.init({
  15.       appId      : '361332261230650317',                        // App ID from the app dashboard
  16.       status     : true,                                 // Check Facebook Login status
  17.       xfbml      : true                                  // Look for social plugins on the page
  18.     });
  19.         FB.getLoginStatus(function(response) {
  20.           if (response.status === 'connected') {
  21.                 alert('connected');// connected
  22.                
  23.           } else if (response.status === 'not_authorized') {
  24.                 alert('not_authorized');// not_authorized
  25.         logout();
  26.                 login();
  27.                
  28.           } else {
  29.                 alert('not_logged_in');// not_logged_in
  30.                 login();
  31.           }
  32.  
  33.  });
  34.  
  35.     // Additional initialization code such as adding Event Listeners goes here
  36.   };
  37.  
  38.    function logout() {
  39.       FB.logout(function(response) {
  40.           // user is now logged out
  41.         });
  42.   }
  43.   function login() {
  44.         FB.login(function(response) {
  45.             if (response.authResponse) {
  46.                 // connected
  47.             } else {
  48.                 // cancelled
  49.             }
  50.         }, {scope: 'email,publish_actions'});
  51.     }
  52.        
  53.  
  54.  
  55.   // Load the SDK asynchronously
  56.   (function(d, s, id){
  57.      var js, fjs = d.getElementsByTagName(s)[0];
  58.      if (d.getElementById(id)) {return;}
  59.      js = d.createElement(s); js.id = id;
  60.      js.src = "//connect.facebook.net/en_US/all.js";
  61.      fjs.parentNode.insertBefore(js, fjs);
  62.    }(document, 'script', 'facebook-jssdk'));
  63. </script>
  64.  
  65.  
  66.          <center>
  67.            
  68.        
  69.        
  70.  
  71.  
  72.          <h1 style="color:#136697;margin-top:180px;">LIKE OUR FACEBOOK PAGE TO DOWNLOAD SCRIPT</h1>
  73.          <div id="like">
  74.          <fb:like href="http://www.facebook.com/pages/MYPAGE/112342345221704090" send="false" width="50" show_faces="false"></fb:like>
  75.          </div>
  76.          <div id="login">
  77.        
  78.          </div>
  79.         </center>
  80.  
  81.  
  82.  
  83.  
  84.  
  85.     </body>
  86. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement