sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Yammer API Integration for Likes and Comments

Open abhishan opened this issue 9 years ago • 5 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.

abhishan avatar Mar 25 '17 20:03 abhishan

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.

VelinGeorgiev avatar May 12 '17 21:05 VelinGeorgiev

Is there any way to get just the Count of Likes and Comments? We can't find an API for it.

saulpreciado avatar Dec 12 '17 15:12 saulpreciado

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

sidjustsid avatar Dec 13 '17 05:12 sidjustsid

Closing as answered.

spdevdocs avatar Oct 29 '18 11:10 spdevdocs

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

msft-github-bot avatar Jan 29 '20 12:01 msft-github-bot