【发布时间】:2014-07-09 21:14:57
【问题描述】:
我可以发布消息,但是当我添加附件或 pending_attachment 时,我收到一条错误消息:
TypeError:在未实现接口 HTMLInputElement 的对象上调用了“stepUp”。
function post() {
yam.getLoginStatus( function(response) {
if (response.authResponse) {
yam.request(
{ url: "https://api.yammer.com/api/v1/messages.json" //note: the endpoint is api.yammer...
, method: "POST"
, data: {
"body" : document.getElementById("post_body").value,
"group_id" : document.getElementById("group_id").value
,"attachment1" : document.getElementById("attachment")
}
, success: function (msg) {
alert("Post was Successful!: " + msg.messages[0].id); //id of new message
}
, error: function (msg) { alert("Post was Unsuccessful..." + msg); }
}
);
} else {
yam.login( function (response) {
//nothing
});
}
});
}
【问题讨论】:
标签: javascript api yammer