Created
January 1, 2013 23:20
-
-
Save rusdyahmad/4430939 to your computer and use it in GitHub Desktop.
Facebook tab page with auto grow height
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Adding channel https://developers.facebook.com/docs/reference/javascript/#channel