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().
To scroll to the top of the page you could use the following code:
FB.Canvas.scrollTo(0,0);
This function requires a params
argument, which is an object with two properties:
Property | Type | Description | Argument |
---|---|---|---|
x |
| Horizontal scroll position. | Required |
y |
| Vertical scroll position. | Required |