Posted By

Reportme on 10/25/11


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

artistandalias


Change facebook iframe tab size


 / Published in: JavaScript
 

  1. <div id="fb-root"></div>
  2. <script src="http://connect.facebook.net/en_US/all.js"></script>
  3. <script>
  4. FB.init({
  5. appId : '<?php echo $app_id; ?>',
  6. status : true, // check login status
  7. cookie : true, // enable cookies to allow the server to access the session
  8. xfbml : true // parse XFBML
  9. });
  10.  
  11. window.fbAsyncInit = function() {
  12. FB.Canvas.setSize({ width: 520, height: 1100 });
  13. }
  14. // Do things that will sometimes call sizeChangeCallback()
  15. function sizeChangeCallback() {
  16. FB.Canvas.setSize({ width: 520, height: 1100 });
  17. }
  18. window.setTimeout(function() { if (window.fbAsyncInit) { fbAsyncInit(); }}, 0);
  19. </script>

Report this snippet  

You need to login to post a comment.