Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h2>I am experiencing the same thing. I don't understand it at all, but it appears that the offset cannot be greater than the limit * 1.5</h2> <p>Theoretically, this means that always increasing the limit to match the offset would fix it, but I haven't been able to verify this (I'm not sure whether the problems I'm seeing are other bugs in my code or if there are other limitations I don't understand about getting the stream).</p> <p>Can anyone explain what I'm seeing and whatever I'm missing?</p> <p>You can reproduce my results by going to the FQL Test Console:</p> <p><a href="http://developers.facebook.com/docs/reference/rest/fql.query" rel="nofollow noreferrer">http://developers.facebook.com/docs/reference/rest/fql.query</a></p> <p>pasting in this query:</p> <pre><code>SELECT post_id, created_time, message, likes, comments, attachment, permalink, source_id, actor_id FROM stream WHERE filter_key IN ( SELECT filter_key FROM stream_filter WHERE uid=me() AND type='newsfeed' ) AND is_hidden = 0 limit 100 offset 150 </code></pre> <p>When you click "Test Method" you will see one of the 2 results I am getting:</p> <ol> <li>The results come back: [{post_id:"926... (which I expected)</li> <li>It returns empty [] (which I didn't expect)</li> </ol> <p>You will likely need to experiment by changing the "offset" value until you find the exact place where it breaks. Just now I found it breaks for me at 155 and 156.</p> <p>Try changing both the limit and the offset and you'll see that the empty results don't occur at a particular location in the stream. Here are some examples of results I've seen:</p> <ul> <li>"...limit 50 offset 100" breaks, returning empty []</li> <li>"...limit 100 offset 50" works, returning expected results</li> <li>"...limit 50 offset 74" works</li> <li>"...limit 50 offset 75" breaks</li> <li>"...limit 20 offset 29" works</li> <li>"...limit 20 offset 30" breaks</li> </ul> <p>Besides seeing the limit=offset*1.5 relationship, I really don't understand what is going on here.</p>
 

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