How to remove scrollbars

First make sure that your canvas site is set to "fluid".

To do so, go to facebook developers, click "Apps" on the top right, click the desired app on the left, click "edit App" on the top right. Click "Advanced" below "Settings". Here you'll find the canvas settings.

Now open the index.html of your app (or index.php).

After the body tag enter this code:

<div id="fb-root"></div>

<script>
removeScrollbars('1111111111111'); // insert here your app id

function removeScrollbars(app_Id) {
    window.fbAsyncInit = function() {
                
        FB.init({
            appId : app_Id,
            status : true, // check login status
            cookie : true, // enable cookies to allow the server to access the session
            xfbml : true // parse XFBML
        });
                
        FB.Canvas.setAutoResize(100);
                
    };
            
    (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>

 

Post A Comment

Anti-Spam Quiz: