问题
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:
- List of likers only has info on 3 users.
- 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