Get a list of users who have liked a media -> not working anymore

浪尽此生 提交于 2019-12-03 13:27:21

问题


I realized, that since Sunday, 8th December 2013 the Instagram API do not return the correct count of users who has liked a media.

Example: For a media with 500 likes the API returns a list with only about 120 users.

Before Sunday everything works well and I do not have any notification from Instagram changing there policy on this topic.

The official Instagram API Console returns the same amount of users like my app, and therefore I think the Instagram API has a bug or they changed the policy.

Do everybody noticed the same issue?

Thanks a lot for any feedback helping to solve the problem! Joseph


回答1:


Instagram appears to have changed their /likes API end point recently. The changes/errors I've noticed are:

  • The count parameter is ignored.
  • Up to a maximum of 120 likes are returned, but the number may be less due to likes from deleted accounts (these are included in the count to 120, but not included in the returned data)
  • The pagination feature of the likes endpoint is no longer being returned (ie only 1 page of likes data is being returned).
  • With an authorised access_token (ie from the user's login), you are unable to retrieve the likes information from media on a private account.

Previously, up to 1000 likes were available per photo via the pagination process.

Like you, I have seen no official announcement of the changes in their API. I continue to be disappointed by their serial lack of communication and constant removal of features from the API.




回答2:


Instagram has always limited the number of likes returned in the {media_id}/likes endpoint to ~100. This is to reduce load on their servers (and to protect the API client from not crashing trying to load potentially thousands of likers in the resultant payload). They do not paginate the list of likers either, unfortunately.

Note though, that in the case where likes exceeds 120, that the number of likers returned in the /likes endpoint is entirely different than the count property returned on the {media_id} endpoint itself.

For example:

https://api.instagram.com/v1/media/607348114809499642_58658/likes

returns only 120 likes in the array, whereas

https://api.instagram.com/v1/media/607348114809499642_58658

indicates the count is 6930

Update

It appears these results may now be paginated as they appear in the official app paginated. However, as TomRoggero points out below, that may not actually be available in the API.



来源:https://stackoverflow.com/questions/20478485/get-a-list-of-users-who-have-liked-a-media-not-working-anymore

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!