Scroll Control

This method is only enabled when Canvas Height is set to "Settable (Default: 800px)" in the App Dashboard.

The method FB.Canvas.scrollTo() causes the Facebook Canvas to scroll to a specific location of your app. This should be used in conjunction with FB.Canvas.setSize() and FB.Canvas.setAutoGrow().

Examples

To scroll to the top of the page you could use the following code:

FB.Canvas.scrollTo(0,0);

Parameters

This function requires a params argument, which is an object with two properties:

PropertyTypeDescriptionArgument

x

integer

Horizontal scroll position.

Required

y

integer

Vertical scroll position.

Required