Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FB iframe canvas height

I have a problem width tha canvas height;
I used the following code:

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

<script type="text/javascript">

    window.fbAsyncInit = function()
    {
        FB.init({appId: 'my_app_id', status: true, cookie: true, xfbml: true});
        FB.Canvas.setAutoGrow();
    };

</script>

inserted before the tag </body>

and it works perfectly.

But if I navigate inside the app the height is not adjusted. It does increase if necessary, but it dosen't decrease when needed; so all pages remain very tall in some situation.

From the App Settings page is only possible choose the width page tab (narrow:520 or widr:810); no settings available for the tab height.

Hope someone could help me, thank you very much.

like image 673
user1403825 Avatar asked Sep 21 '26 04:09

user1403825


1 Answers

But if I navigate inside the app the height is not adjusted. It does increase if necessary, but it dosen't decrease when needed; so all pages remain very tall in some situation.

FB.Canvas.setAutoGrow does not decrease the iframe height, it only increases it if necessary.

And setting the size explicitly to a smaller height than the actual one doesn’t work either, from my tests.

like image 157
CBroe Avatar answered Sep 23 '26 19:09

CBroe