Facebook iframe being cut off in Firefox 3.6.x on Mac when using setAutoResize()

Another day, another Facebook development quirk.

If you’re having issues with your iframe not automatically resizing to full height in Firefox on Mac when using FB.Canvas.setAutoResize, try manually setting the height using FB.Canvas.setSize as in the code below. Obviously, this is only really an option if your know how tall your application will render and it’s the same from page to page or you manually set it on each page.

    <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: '<%= ConfigurationManager.AppSettings["FacebookAppID"] %>', status: true, cookie: true, xfbml: true });        FB.Event.subscribe('auth.sessionChange', function (response) {            if (response.session) {                // A user has logged in, and a new cookie has been saved                            } else {                // The user has logged out, and the cookie has been cleared            }        });

        $(document).ready(function () {            FB.Canvas.setSize({ height: 1100 });        });    </script>

About the author

Abby Sims

Copyright © 2016, Abby Sims