I am using facebook graph api to display a Facebook page's data in a website, there are lots of posts, so i must use pagination because FB now returns only 100 posts per call, so to get next 100 posts i have to use pagination. To do that i found cursor based pagination suitable.
I am using jquery ajax to get data from FB by calling with this url -
https://graph.facebook.com/page_id/feed?fields=id,likes.limit(1).summary(true){id},comments.limit(1).summary(true){id}&limit=100&access_token=token_here
now when i get data there should be cursors value at last to implement pagination as follows -
"paging": {
"cursors": {
"after": "MTAxNTExOTQ1MjAwNzI5NDE=",
"before": "NDMyNzQyODI3OTQw"
},
"previous": "https://graph.facebook.com/page_id/feed?limit=100&before=NDMyNzQyODI3OTQw"
"next": "https://graph.facebook.com/page_id/feed?limit=100&after=MTAxNTExOTQ1MjAwNzI5NDE="
}
But i don't see it. So how i can be sure that i get above 'after' and 'before' parameter values at the end of returned data to traverse through next 100 posts? In what circumstances these cursors values appear when i get FB page data using graph api calls? please reply with details and examples if possible.