Created
August 13, 2012 14:27
-
-
Save wayneashleyberry/3341219 to your computer and use it in GitHub Desktop.
Set Facebook iFrame height
This file contains 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
// 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() | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks :)