If your see a scroll bar in your Facebook IFrame application and want to prevent it, follow the below steps.
1. Go to your application settings, in the Facebook Integration tab of your setting, select Auto-resize for IFrame size.
2. In your app, add the below code after the body tag.
<div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({appId: "{your app id}", status: true, cookie: true, xfbml: true}); FB.Canvas.setSize(); }; (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>
FB.Canvas.setSize() is the piece of code that is responsible for removing the scroll bar.
Thanks for this code !
You are welcome ๐
thanks ๐
cant figure this out
Thanks for sharing, worked well
+1
hello! what about if you put facebook comments in it?? I ve added this line
and the scrollbars is there!!!
Any ideas?
Your code piece did not show up, but I will not be of much help here as it has been quite sometime since I did facebook development.
Thanks, for me it works, but i had to put overflow: hidden; in my style sheet file.
The next time I read a blog, I hope that it does not disappoint me as much as this
one. I mean, I know it was my choice to read through, but I actually believed you would probably have something useful to talk about.
All I hear is a bunch of crying about something
that you can fix if you were not too busy searching for attention.
streetdirectory