Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As @Floyd said the scroll events will not fire (assuming you are hiding the iframe scrollbars) as your App is in an iframe inside of Facebook.</p> <p>You can detect the users scroll position on the page (Facebook, not your app - so it won't be completely accurate unless you take the header and floating header into account) by using <code>FB.Canvas.getPageInfo</code> <a href="http://developers.facebook.com/docs/reference/javascript/FB.Canvas.getPageInfo/" rel="nofollow">http://developers.facebook.com/docs/reference/javascript/FB.Canvas.getPageInfo/</a> but you have to poll the event when ever you want to check the users scroll position, so you could set it up on a timer with <code>setInterval</code>.</p> <p>I just created a plugin for this purpose to use in one of my Facebook apps. To use it all you simply do is include the plugin after your window.fbAsyncInit function and before you load the Facebook Javascript SDK.</p> <p>You can subscribe to the Facebook event "scroll" or listen to the dom event "fb-scroll" which two parameters will be passed "topPercent" and "bottomPercent" and then call your own functions based on the users scroll position.</p> <p><a href="https://github.com/kus/facebook-app-scroll-event" rel="nofollow">https://github.com/kus/facebook-app-scroll-event</a></p> <p>Example:</p> <pre><code>// Subscribe to custom Facebook event FB.Event.subscribe('scroll', function(topPercent, bottomPercent){ console.log('scroll', topPercent, bottomPercent); }); // Listen to dom event with jQuery jQuery(document).on('fb-scroll', function(evt, topPercent, bottomPercent){ if(bottomPercent == 100){ // load more content } }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload