【问题标题】:Yammer Rest API for posting status用于发布状态的 Yammer Rest API
【发布时间】:2014-11-20 07:28:04
【问题描述】:

我是 yammer 的新手。我想使用 Yammer RESTAPI 在 yammer 上发布状态。 据我所知,这段代码

yam.platform.request({
    url: "https://api.yammer.com/api/v1/messages.json",
    method: "POST",
    data: {
        "body" : "message body",
        "group_id": "group id",
        "topic1": "topic1",
        "og_url": "http://www.google.com"
    },
    success: function (result) {
        alert("success");
        console.dir(result);
    },
    error: function (result) {
        alert("There was some error");
        console.dir(result);
    }
)};

此代码在 yammer 上发布状态,但它还显示用

编写的警告框
error: function(result){
   alert("There was some error");
   console.dir(result);
}

我也改变了 url 值 -

url: "messages.json",

但问题仍然存在。

谁能知道这将如何工作..???

【问题讨论】:

    标签: jquery yammer


    【解决方案1】:

    看看我们的代码,我们似乎只传入了资源而不是完整的 url(见下文)

    yam.platform.request(
    {
        url: "messages/private.json",
        method: "GET",
        success: function (response) {
            console.log(response);
        },
        error: function (response) {
            alert("There was an error with the request.");
        }
    });
    

    【讨论】:

      猜你喜欢
      • 2018-07-31
      • 1970-01-01
      • 2015-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-20
      • 2020-11-16
      • 1970-01-01
      相关资源
      最近更新 更多