Monday, December 26, 2011
« Adaptive Payments Error This transaction... | Main | Using Better Naming to Clarify Code »

If you have annoying scrollbars around your Facebook app's canvas, here's what you need to do:

First, go to your app's settings, click "Edit App" and then "Advanced" on the right.

Scroll all the way down to "Canvas Settings" and change "Canvas Height" to "Settable".

Second, add a call to FB.Canvas.setSize() (http://developers.facebook.com/docs/reference/javascript/FB.Canvas.setSize/). Make this call inside window.fbAsyncInit, after calling FB.init.

That's it! Gorgeous app, no scrollbars!

Want to join me as partner in a cool new startup?
Get in touch: pasha at cohai dot co

Bookmark and Share Tuesday, December 27, 2011 4:50:42 AM (Jerusalem Standard Time, UTC+02:00)  #    Comments [6]  
Saturday, January 14, 2012 11:24:29 AM (Jerusalem Standard Time, UTC+02:00)
It's always a rleeif when someone with obvious expertise answers. Thanks!
Sunday, January 15, 2012 3:43:06 AM (Jerusalem Standard Time, UTC+02:00)
OYz6fz <a href="http://vjrixzwmfgpy.com/">vjrixzwmfgpy</a>
Sunday, January 15, 2012 8:10:35 PM (Jerusalem Standard Time, UTC+02:00)
k8yhtQ , [url=http://jerrzvzhygtl.com/]jerrzvzhygtl[/url], [link=http://eabwrmksysah.com/]eabwrmksysah[/link], http://ecidvkjtnhye.com/
Monday, January 16, 2012 7:24:25 PM (Jerusalem Standard Time, UTC+02:00)
7b4vdp <a href="http://jcnyrgwzdsqk.com/">jcnyrgwzdsqk</a>
Thursday, January 19, 2012 3:07:55 AM (Jerusalem Standard Time, UTC+02:00)
O4KcSS , [url=http://uuzzahnwuzjb.com/]uuzzahnwuzjb[/url], [link=http://txoxvzcvrlut.com/]txoxvzcvrlut[/link], http://kpcqwvnneabp.com/
Friday, February 10, 2012 8:31:21 AM (Jerusalem Standard Time, UTC+02:00)
Hey - thanks for the article. Just a note: I recommend using setAutoGrow instead, and putting it in the window.onload function. And then to remove scrollbars use body{overflow:hidden;} - I wrote a blog post about it here: http://atomiku.com/2012/02/remove-scrollbars-and-get-your-facebook-app-iframe-to-autosize-to-height-fb-canvas-setautogrow/ - Thanks! :]
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):