开发者

Why are there next AND previous paging URLs in the initial response from a Facebook Graph query?

Why would there be a next AND previous link in the original search results?

Say for example:

https://graph.facebook.com/search?q=car&type=post&access_token=...

At the end of the first page of results开发者_StackOverflow you are able to page backwards and forwards? I would have expected to just go forwards then the next result page should have both previous and next.

...] , "paging": {

"previous": "https://graph.facebook.com/search?q=car&type=post&access_token=...", "next": "https://graph.facebook.com/search?q=car&type=post&access_token=..." }


The next and previous on the initial query allows you to at a later time use the links to query the server for newer data then you had previously gotten.

This way you can request ONLY the new data, and have to parse ONLY the new data, and then you can elegantly shove the new data in with the already existing data that you had previously received.

This i presume is why they use a time stamp in the next and previous links as well instead of an offset.

Hope that helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜