I'm trying to get the all the likes of the a post by using the Graph api.I'm able to get only the 1000 likes in json response and the other likes data is in the paging obj next link.How can i break that paging to get all the post likes of the post in one single Graph api call.

enter image description here

1

There are 1 best solutions below

0
On

You can add the limit parameter and set it to a desired value, but you should have this sentence from the Facebook Graph API Reference in mind:

Some edges have an upper maximum on the limit value, for performance reasons. We will return the correct pagination links if that happens.

if you use RestFB you simply have to work with the Connection object and check the manual how to use it. But I guess you don't want to do multiple calls to fetch all your likes? Do you run into some limits?