Get a list of users who have liked specific media on Instagram

前端 未结 1 1300
遥遥无期
遥遥无期 2021-01-20 12:51

Using Instagram API I need to get a list of users who have liked specific media.

The following call should return the list of all users according to the documentatio

相关标签:
1条回答
  • 2021-01-20 13:10

    Unfortunately they only provide the latest 120 likes in newest-to-oldest order with no pagination. You can test this by requesting a photo then liking it and you'll see that your account is on top of the list.

    The only work around is to set up a job to periodically cache likes beginning shortly after the photo is first posted. Since you're always getting the newest 120 you can get them all that way. You can create a subscription to a user using the realtime api and get a ping when your user posts a new photo, then start caching likes. A decaying rate would be advised - maybe cache a couple times the first hour after it's posted, then less and less frequently the longer it's been.

    0 讨论(0)
提交回复
热议问题