php 및 javascript를 사용하여 yammer 상태를 만들고 싶습니다. 이것은 내 샘플 코드입니다.주제가있는 상태를 작성하고 주제를 다시 얻으려는 Yammer REST API
<script type="text/javascript" data-app-id="client-id" src="https://c64.assets-yammer.com/assets/platform_js_sdk.js"></script>
<span id="yammer-login"></span>
<script>
$(function(){
yam.connect.loginButton('#yammer-login', function (resp) {
if (resp.authResponse) {
yam.platform.request({
url: "messages.json",
method: "POST",
data: {
"body" : "Message body",
"group_id": "4728511", //group id
"topic1": "TestTopic1",
"og_url": "http://google.com"
},
success: function (res) { //print message response information to the console
alert("The request was successful.");
console.dir(res);
yam.platform.request({
url: "https://www.yammer.com/api/v1/search.json",
method: "GET",
data: {
"search" : "TestTopic1"
},
success: function (data) { //print message response information to the console
alert("The request was successful.");
console.dir(data);
},
error: function (data) {
alert("There was an error with the request.");
console.log(data)
}
});
},
error: function (res) {
alert("There was an error with the request.");
console.dir(res);
}
});
}
});
상태가 yammer에서 업데이트되지만 표시 오류가 발생합니다. 또한 주제 ID를받지 못했습니다. 그래서 어떻게 해결할 수 있습니까 .. ?? search.json에 두 번째 호출이 범인처럼 사전에
덕분에
당신의 더 쉽게 질문. –