Yammer REST API - Message Likes

不想你离开。 提交于 2019-12-23 05:29:22

问题


My goal is to get the users who liked each message/comment, and when the like occurred. Currently when querying the Messages endpoint each message has a section called liked_by that contains a count of the total likes on each message/comment, and an array of users that liked the message/comment. However, what I am seeing is that the array with the list of users can not return more than 4 users in the array, even though the message/comment has a total of more than 4 likes. Specifically, if the message/comment has exactly 4 likes, then 4 users are returned in the array. However if the message/comment has greater than 4 likes, only 3 users are returned in the array.

Is there a way to get the Messages endpoint to return all the users who liked each message/comment in the array? Or is there possibly another way to pull message/comment likes with what message/comment was liked, by what user it was liked by, and at what time the like occurred?

Thanks!


回答1:


The Yammer API will only return users that have liked a message as follows:

1 - If three people like a message, display all three

2 - If four people like a message, display all four

3 - If five people or more like a message, display three and use the front-end code to say "x, y, z and n others liked this" (where n = total number of likes minus 3)

There is no workaround that I can find to display all the users that liked a particular message.




回答2:


four years later there is a workaround for this, please see this answer:

See here for further details - https://developer.yammer.com/docs/usersliked_messagemessage_idjson



来源:https://stackoverflow.com/questions/25046312/yammer-rest-api-message-likes

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