Skip to content

Instantly share code, notes, and snippets.

@wayneashleyberry
Created August 13, 2012 14:27
Show Gist options
  • Save wayneashleyberry/3341219 to your computer and use it in GitHub Desktop.
Save wayneashleyberry/3341219 to your computer and use it in GitHub Desktop.
Set Facebook iFrame height
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
// Set canvas size
window.fbAsyncInit = function() {
FB.init({
appId : YOUR_APP_ID_HERE
});
FB.Canvas.setSize({
width: 810,
height: $('body').height()
});
}
@assertchris
Copy link

Thanks :)

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