Pages

Monday, October 17, 2011

Removing the Facebook iframe scrollbars for App Canvas/Page Tab

My colleague Behestee gave me the link:

http://facebook.stackoverflow.com/questions/6345363/facebook-fb-canvas-setsize-not-working

A guy named waqar alamgir posted the solution that worked perfectly.





<head>
<script type="text/javascript">
window.fbAsyncInit = function()
{
    FB.Canvas.setSize();
}
</script>
</head>

.
.
.
.

    <div id="fb-root"></div>
    <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> 
    <script type="text/javascript">

    FB.init({
        appId: 'xxxxxxxx', 
        status: true, 
        cookie: true, 
        xfbml: true
    });

    /* Init fb Resize window */
    FB.Canvas.setAutoResize(7);

    </script>
</body>
</html>

No comments :

Post a Comment