javascript - Yammer not working using js -


i have tried display data yammer using embedded feed using below code work:

yam.connect.embedfeed({ container: "#embedded-feed", network: "elliottaustralia.com", feedtype: "group", feedid: "1000157" });

but not work custom code fetch data follow:

 <script type="text/javascript">      var tagdisplayname = "supplier";      var groupid = "1000157";      yam.connect.loginbutton('#yammer-login',          function (response) {              if (response.authresponse) {                  var yurl = "https://www.yammer.com/api/v1/messages/in_group/" + groupid + ".json?include_counts=true&threaded=extended&exclude_own_messages_from_unseen=true";                  yam.request(                      {                          url: yurl,                          method: "get",                          type: "json",                          success: function (msg) {                              //data of meta tag                              var meatres = msg.meta;                              var lastmessageid = meatres.last_seen_message_id;                          },                          error: function (msg) {                              alert("post unsuccessful..." + msg);                          }                      }                  );              } else {                  alert('errro');              }          }      );   </script> 

this code give error.....how solve it?

check yammer documentation on https://developer.yammer.com/yammer-sdks/#javascript-sdk may need register app, use updated js sdk call page - you'll need newer api call

<script type="text/javascript" data-app-id="[your app id]" src="https://assets.yammer.com/assets/platform_js_sdk.js"></script> 

then in group call just

yam.platform.request({ 

url: "messages/in_group/1312007.json?threaded=true"

hope helps. rich


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -