Facebook Graph API - Pagination (Swift)

I am trying to find Facebook friends for my app in Swift and I am getting JSON like this:

{
  "data": [
    {
      "name": "Karen Alafeadafcahh Schrockescu",
      "id": "101771987049940"
    },
    {
      "name": "Mark Alafefedijcba Warmansky",
      "id": "100225727206277"
    }
  ],
  "paging": {
    "cursors": {
      "before": "QVFIUmlZARmxZAc24wU1lkaGVkUGQ0Y041NXVSVHZAuUWRkYjNRRDJSSklXQUN2Y0pBM0VveUNERzJTQ2gtUGxVZAG5mZAVJoVmhqOVVkdVp0ckVRZA2dZAamJwNFR3",
      "after": "QVFIUlJMbnJZAdEFJNUJ1ZAjdFbGZAjVk5DWFRoR2doOFg1ZAy1qN2RPaWkydTNxUFRGMGVReFctSm9NUjVoUkJnTXA3UG1PZA0QzY3lrVzlzZAlJ4ZA2pwSHhsWWJB"
    }
  },
  "summary": {
    "total_count": 10
  }
}

      

But there are no "previous"

or fields "next"

to get the next friends page (in the above example there should be 10 friends). Do I have to specify it in the parameters of the GraphRequest somehow? Or is there a way to use these cursors?

thank

+3


source to share





All Articles