Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 1.13 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. like and send options for a website
  2. <div id="fb-root"></div>
  3. <script>
  4.   window.fbAsyncInit = function() {
  5. FB.init({
  6.   appId      : 'YOUR_APP_ID', // App ID
  7.   channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
  8.   status     : true, // check login status
  9.   cookie     : true, // enable cookies to allow the server to access the session
  10.   xfbml      : true  // parse XFBML
  11. });
  12.  
  13. // Additional initialization code here
  14.   };
  15.  
  16.   // Load the SDK Asynchronously
  17.   (function(d){
  18.  var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
  19.  js = d.createElement('script'); js.id = id; js.async = true;
  20.  js.src = "//connect.facebook.net/en_US/all.js";
  21.  d.getElementsByTagName('head')[0].appendChild(js);
  22.    }(document));
  23. </script>
  24.        
  25. <?php
  26.     $cache_expire = 60*60*24*365;
  27.     header("Pragma: public");
  28.     header("Cache-Control: max-age=".$cache_expire);
  29.     header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$cache_expire) . ' GMT');
  30.   ?>
  31.   <script src="//connect.facebook.net/en_US/all.js"></script>
  32.        
  33. <html xmlns:fb="http://ogp.me/ns/fb#">
  34.        
  35. <fb:like href="WWW.YOUR_DOMAIN.COM" send="true" width="450" show_faces="true"></fb:like>