Note: this method is only enabled when Canvas Height is set to "Fluid" in the App Dashboard.
Tells Facebook to resize your iframe. If you do not specific any parameters Facebook will attempt to determine the height of the Canvas app and set the iframe accordingly. If you would like to set the dimension explicitly pass in an object with height and width properties.
If the Canvas Width toggle in set to "Fixed (760px)" in the App Dashboard the max width is 760 pixels. There is no max height.
Call this whenever you need a resize. This usually means, once after pageload, and whenever your content size changes. The example below will attempt to determine the size of the Canvas app content and set the height automatically.
FB.Canvas.setSize();
Note: when determining the Canvas Height automatically the height it can only be increased, not decreased. When possible please pass the explicit dimensions as properties of an object.
FB.Canvas.setSize({ width: 640, height: 480 });
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| params | Object |
|