I am trying to iterate over the user ID of each like for a given {media_id}
https://api.instagram.com/v1/media/{media-id}/likes?access_token=ACCESS-TOKEN
is returning something like this (a data array of approx 300 likes)
{
"data": [{
"username": "jack",
"first_name": "Jack",
"last_name": "Dorsey",
"type": "user",
"id": "66"
},
{
"username": "sammyjack",
"first_name": "Sammy",
"last_name": "Jack",
"type": "user",
"id": "29648"
}]
}
The problem is that it does not return ALL the likes, or any pagination feature.
Is there any workaround to get ALL likes for a given {media_ID}?
You're using the correct API endpoint to get media likes, however this endpoint has a limitation. It only returns a maximum of 100-120 likes per media with no pagination.
Unfortunately there is no workaround!
The same limitation applies for the comments endpoint.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With