Facebook App dev : How to get rid of scrollbars from the Canvas [solved]

SDK :  JavaScript SDK

Facebook App canvas width is 760 px. I see scrollbars both vertically and horizontally. To get rid of these, its a simple two steps.

Step 1 : add the code “FB.Canvas.setAutoResize();”

window.fbAsyncInit = function() {
FB.Canvas.setAutoResize();
    FB.init( {
appId    :  ‘xxxxxxx’;
channelUrl : ‘xxxxxxxxxxxxx’,
status  : true;
………….

}

Step 2 : set css “overflow: hidden”  to the “body”

body {
overflow: hidden;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s