Skip to content

Instantly share code, notes, and snippets.

@rusdyahmad
Created January 1, 2013 23:20
Show Gist options
  • Save rusdyahmad/4430939 to your computer and use it in GitHub Desktop.
Save rusdyahmad/4430939 to your computer and use it in GitHub Desktop.
Facebook tab page with auto grow height
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function () {
FB.init({
appId: 'XXXXXXXXXXXX', // App ID
channelUrl: '//domain.com/channel.html', // Channel file can be .php @ anything
});
FB.Canvas.setSize({
height: 600
});
setTimeout("FB.Canvas.setAutoGrow()", 500);
};
// Load the SDK Asynchronously
(function (d) {
var js, id = 'facebook-jssdk';
if (d.getElementById(id)) {
return;
}
js = d.createElement('script');
js.id = id;
js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
@rusdyahmad
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment