Want more features on Pastebin? Sign Up, it's FREE!
Guest

FB setSize

By: a guest on May 9th, 2011  |  syntax: HTML  |  size: 0.50 KB  |  views: 286  |  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. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <div id="fb-root"></div>
  6. <script>
  7. window.fbAsyncInit = function() {
  8.         FB.init({appId: 'your app id', status: true, cookie: true,
  9.                          xfbml: true});
  10.         FB.Canvas.setSize();
  11. };
  12.  
  13. function sizeChangeCallback() {
  14.         FB.Canvas.setSize();
  15. }
  16. (function() {
  17. var e = document.createElement('script'); e.async = true;
  18. e.src = document.location.protocol +
  19.   '//connect.facebook.net/en_US/all.js';
  20. document.getElementById('fb-root').appendChild(e);
  21. }());
  22. </script>
  23. </body>
  24. </html>
clone this paste RAW Paste Data