Yammer API - how to get full list of likes using messages endpoint?

Deadly 提交于 2019-12-11 18:32:51

问题


I've noticed that the messages.json endpoint doesn't seem to return all the data needed to show the likes per message.

Specifically, two things seem to be happening:

  1. List of likers only has info on 3 users.
  2. The avatar images for the likers is not always available when looking up through the "references" array.

We're using the JS SDK for our integration.

Thanks


回答1:


https://api.yammer.com/api/v1/users/liked_message/:Message_id.json should return user properties of LIKERS, a count of all LIKERS should give you the total LIKES per message.

In practice, you'd need to call the messages endpoint, get the message id, then pass it into users/liked_message/:Message_id.json programatically.

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



来源:https://stackoverflow.com/questions/33901364/yammer-api-how-to-get-full-list-of-likes-using-messages-endpoint

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