Facebook API Missing Paging Cursors

Viewed 95

I am using the Facebook API to retrieve comments from my posts.

Most of the time, when there are more than 25 comments on a post, I am given this paging information:

{
//COMMENT DATA
  "paging": {
    "cursors": {
      "before": "",
      "after": "WTI5dGJXVnVkRjlqZAFhKemIzSTZAOekl4Tmprd016WTNNVFk0TXprNU1qb3hOalE0TmpZAM05UVXgZD"
    },
    "next": "https://graph.facebook.com/v12.0/165099760197787_7215028868538139/comments?access_token=ACCESS_TOKEN&pretty=1&limit=25&after=WTI5dGJXVnVkRjlqZAFhKemIzSTZAOekl4Tmprd016WTNNVFk0TXprNU1qb3hOalE0TmpZAM05UVXgZD"
  }
}

Or, if there isn't another page, I get this (no "next" value):

{
//COMMENT DATA
  "paging": {
    "cursors": {
      "before": "WTI5dGJXVnVkRjlqZAFhKemIzSTZAOekl4TlRNNU56QTJOVEUyTnprNE5qb3hOalE0TmpReE16WXkZD",
      "after": "WTI5dGJXVnVkRjlqZAFhKemIzSTZAOekl4Tmprd016WTNNVFk0TXprNU1qb3hOalE0TmpZAM05UVXgZD"
    }
  }
}

Everything works well with the above. But sometimes, I get paging information that doesn't have ANY paging cursors despite definitely having more than 25 comments. How am I supposed to page through the data with this? Any idea why it is giving me incomplete paging data? It looks like this:

{
//COMMENT DATA
  "paging": {
    "next": "https://graph.facebook.com/v12.0/165099760197787_1346071832565247/comments?access_token=ACESS_TOKEN&pretty=1&limit=25&after"
  }
}
0 Answers
Related