Edit yammer comment using REST Api RRS feed

  • Question

  • How can i edit a Yammer comment using REST Api ? 

    Please have a look into my code below.

    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

    url: ""+MessagePostId,
    method: "PATCH",

    data: commentData,
    success: function (res) {
    alert("The request was successful.");
    error: function (res) {
    alert("There was an error with the request.");

    When using above url, I get  errors.First  "Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource." error.  Second CORS policy blocker error.

    I tried "PATCH" and "POST" as well but facing the same issue again and again.

    By any chance, is there any information about REST api for edit comments functionality ?.

    Thursday, May 21, 2020 7:22 AM