使用REST Api编辑yammer评论。

问题描述 投票:0回答:1

当使用"https:/api.yammer.comapiv1messages。",我得到了错误.第一个 "响应预检请求没有通过访问控制检查。No 'Access-Control-Allow-Origin' header is present on the requested resource." 错误。 第二个CORS策略拦截器错误。

function editComment(MessagePostId,GroupID) {
var commentData = new FormData();
commentData.append('body', editedComment); //updated comment text
commentData.append('group_id', GroupID); //group id
commentData.append('replied_to_id', MessagePostId); Individual message id 
yam.platform.request({
   url: "https://api.yammer.com/api/v1/messages/"+MessagePostId,
   method: "PATCH",
   data: commentData,
   success: function (res) { 
      alert("The request was successful.");
      console.dir(res);
   },
   error: function (res) {
      alert("There was an error with the request.");
      console.log(res)
   }
})}

我也尝试了 "POST",但一次又一次面临同样的问题。

有没有可能,有任何关于REST api编辑评论功能的信息?

office365api yammer restapi
1个回答
1
投票

目前公共API不支持编辑。这一点在最初的版本公告中已经指出。

端点将继续获得每个消息的最新版本。数据将不包括版本历史或编辑标志。 不会有对消息进行编辑的端点。

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.