Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setAutoGrow: other pages should "shrink" again

I'm using FB.Canvas.setAutoGrow(7); to grow my page (page=highscore table so needs to grow).

However, when I go back to other pages, the canvas stays grown, but it should adapt to the new content, off course... Basicly, it needs to shrink again.

I tried setSize but that didn't work.

Anyone who can help me? I've been looking for hours... Thanks a lot!!!

like image 531
binoculars Avatar asked Jun 02 '12 14:06

binoculars


1 Answers

try this - shrink the canvas when you load a new page and then call setAutoGrow()

FB.Canvas.setSize({height:600});
setTimeout("FB.Canvas.setAutoGrow()",500);

here is a full article describing the solution http://www.twistermc.com/36764/shrink-facebook-tabs/

like image 86
Pavel Nikolov Avatar answered Sep 28 '22 03:09

Pavel Nikolov