Skip to content

Instantly share code, notes, and snippets.

@niraj-shah
Created October 8, 2013 16:51
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save niraj-shah/6887730 to your computer and use it in GitHub Desktop.
Facebook Page App Scrolling Examples
<!-- anchor example -->
<a href="#" onclick="FB.Canvas.scrollTo( 0, 500 );">Click here to enter</a>
<!-- anchor with jQuery dynamic placement example -->
<a href="#" onclick="FB.Canvas.scrollTo( 0, $('.enter-btn').offset().top );">Click here to enter</a>
<!-- page load example -->
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId : 'xxx', // App ID
channelUrl : 'channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
FB.Canvas.scrollTo(0, 0);
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment