PHP webdeveloper and frontend developer

Scroll to top of page from within Facebook app

When within a facebook app you sometimes want to scroll to the top of the page but outside of the iframe which contains your app. To do that you use the following code in javascript:

 This will only work when your canvas height is set to “Settable”. By default 800px. You can make in settable in the app Dashboard

The scrollTo function uses two parameters. First is x position en second is y position to scroll to.


Leave a Reply

Your email address will not be published. Required fields are marked *