provide these lines when calling initialization:
FB.Canvas.setSize({ height: (newHeight+20) }); setTimeout(function() { FB.Canvas.setSize({ height: (newHeight+40) }); }, 100);
Full code:
window.fbAsyncInit = function() {
FB.init({
appId : 'thisIsYourAppID',
xfbml : true,
version : 'v2.3'
});
var wrapper = $("#wrapper");
wrapper.height('auto');
var newHeight = wrapper.height();
wrapper.height(newHeight);
FB.Canvas.setSize({ height: (newHeight+20) });
setTimeout(function() {
FB.Canvas.setSize({ height: (newHeight+40) });
}, 100);
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));