Resizing Facebook iFrame app with new Javascript SDK
1 answer
<strong> Examples
This feature is useful if you know your content will change size, but you don't know when. There will be a slight delay, so if you know when your content is resizing, you should call setSize yourself (and save the user's CPU cycles).
window.fbAsyncInit = function() {
FB.Canvas.setAutoResize();
}
If you need to stop the timer, just pass false .
FB.Canvas.setAutoResize(false);
If you want the timer to run at a different interval, you can do that as well.
FB.Canvas.setAutoResize(91);
Note: If there is only one parameter and this is a number, it is assumed to be an interval.
Parameters
Name Type Description
onOrOff Boolean Whether to turn the timer on or off. true == on, false == off. default is true
interval Integer How often to resize (in ms). default is 100ms
+2
a source to share