How to Set Facebook Page Tab Content Auto Resize Height?

The height of Facebook Page Tab is fixed at 800px, so to set Facebook Page Tab content auto resize height you must add code below at the bottom of body tag.

code for auto resize height
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<div id="fb-root"></div>
<script type="text/javascript" src="http://connect.facebook.net/de_DE/all.js1">
</script>
<script type="text/javascript">
  window.fbAsyncInit = function() {
    FB.init({
      appId : 'APP_ID',
      cookie : true
    });
  }

  window.onload = function() {
    FB.Canvas.setAutoGrow(10);
  }
</script>

Enjoy it