Wednesday, August 20, 2014

In post I discussed about how to use REST API calls and in post – I explained how to get all public messages using REST API call. The post explains how to use Message REST endpoint and get the response; how to use that response and show the results on the page in the form of html.

In this post we will see how to get all Top conversations user has. These are the conversations which are most relevant to the user. Getting most relevant and useful conversation on top or separately is very common requirement in the enterprise social network. Most of the expertise are interested in topics which are relevant to their work, their daily activity. So why do Yammer remain behind? They have provided option in Yammer site to see the Top conversation. But what about portal where Yammer has been integrated? How you can show the Top messages to the end users when they log in to portal?

So the answer is Yammer REST API. Yammer has provided below endpoint using which you can fetch the Top messages and display on the page.

To get Top Conversation following endpoint is useful:


Or you can use only 'messages/algo.json' if you use yam.platform.request for call.

Script to fetch the Top conversation:

                          url: "messages/algo.json"
                      , method: "GET"
                      , data: { 'limit': limit}
                      , success: function (responseData) {
                      , error: function (msg) { alert("Error..." + msg); }

You can use the script of the Post: . Copy the complete script and just replace the REST endpoint/URL with the 'messages/algo.json'. And use the script you can get the all Top conversations.

Happy SharePoint coding.


Post a Comment