Jack Hernandez
Jack Hernandez

Reputation: 11

My Facebook iframe app is cut off on the bottom

Previous to the new Facebook timeline, my apps would be cut off at the bottom. I fixed the issue using the following code and it worked.

window.fbAsyncInit = function() {
FB.Canvas.setAutoResize(); }; (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); }());

Now, the problem has returned, and I'm at a loss. I've tried several techniques explained in this forum (autogrow, setsize), but can't seem to get it to work. I'd appreciate any bones you can throw in my direction. I use primarily Chrome and Firefox.

Link to my app: http://www.facebook.com/NACoDC/app_136524766420341

Upvotes: 1

Views: 1571

Answers (1)

TJ Sherrill
TJ Sherrill

Reputation: 2645

I have been able to do this twice now using the following:

Add this to the header of your html doc:

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

Input this code above the body close

    <script type="text/javascript">
    window.fbAsyncInit = function() {
    FB.Canvas.setAutoResize( 100 );
    }
    // Do things that will sometimes call sizeChangeCallback()
    function sizeChangeCallback() {
    FB.Canvas.setSize({ width: 520, height: 2400 });
    }
    </script>

In your app settings => Advanced set Canvas Height to fixed 800px.

this has worked for me.

Upvotes: 1

Related Questions