Change facebook iframe tab size


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.