Skip to content

Instantly share code, notes, and snippets.

@lukemartin
Created July 20, 2011 08:16
Show Gist options
  • Save lukemartin/1094564 to your computer and use it in GitHub Desktop.
Save lukemartin/1094564 to your computer and use it in GitHub Desktop.
Facebook: Auto-resize height of iframe
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId: 'APP_ID_HERE',
status: true,
cookie: true,
xfbml: true
});
FB.Canvas.setAutoResize(100);
};
(function() {
var e = document.createElement('script');
e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment