Yammer API Integration for Likes and Comments
Category
- [x] Question
- [ ] Typo
- [ ] Bug
- [ ] Enhancement / Suggestion
- [ ] Additional article idea
Expected or Desired Behavior
Yammer Like and Comment integration with webpart. We are currently developing a webpart for a client using which news articles can be displayed on the page. Whenever an item is created, we are using Flow to create a Post in Yammer and saving the PostID in the SharePoint list item. We would like to integrate the social "Like" and "Comment" with Yammer. When a user hits the like button in the webpart, the Yammer post should get a like. The likes and comments count from Yammer to be displayed here within this webpart.
How do we call Yammer API from within a SPFx webpart? Any guidance or references would really be helpful.
Hello @abhishan ,
There is already sample on how to interact with the Yammer REST APIs from SPFx webpart. It does not have like or comment functionality implemented, but shows you how to authenticate and call web services so I guess this will be enough for you to start extending based on your needs.
Is there any way to get just the Count of Likes and Comments? We can't find an API for it.
There is an api to get Likes and Comments in yammer developer centre. https://developer.yammer.com/docs/messagesin_threadthreadidjson
By passing the Thread ID in the below URL, you can get the count of Likes and Comments. https://www.yammer.com/api/v1/messages/in_thread/:thread_id.json
Closing as answered.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues