我正在使用Linking JS SDK并按照以下示例在我的公司页面上分享帖子: https://developer.linkedin.com/docs/company-pages
我用吹码来分享帖子:
// Build the JSON payload containing the content to be shared
function onSuccess(response){
console.log(response);
}
function onError(){
console.log(response);
}
var payload = {
"comment": "Check out developer.linkedin.com! http://linkd.in/1FC2PyG",
"visibility": {
"code": "anyone"
}
};
var cpnyID = 2414183;
IN.API.Raw("/companies/" + cpnyID + "/shares?format=json")
.method("POST")
.body(JSON.stringify(payload))
.result(onSuccess)
.error(onError);
// Build the JSON payload containing the content to be shared
function onSuccess(response){
console.log(response);
}
function onError(){
console.log(response);
}
var payload = {
"comment": "Check out developer.linkedin.com! http://linkd.in/1FC2PyG",
"visibility": {
"code": "anyone"
}
};
var cpnyID = 2414183;
IN.API.Raw("/companies/" + cpnyID + "/shares?format=json")
.method("POST")
.body(JSON.stringify(payload))
.result(onSuccess)
.error(onError);
作为回应我得到:
{
"errorCode": 0,
"message": "Internal service error",
"requestId": "TZ1QE0M3VP",
"status": 500,
"timestamp": 1526892099561
}
我尝试过不同的用户和许多不同的公司ID,我也尝试过新用户和新公司页面,但每次从服务中返回“内部服务错误”。
请帮助。