为什么LinkedIn API在针对特定群组发布到LinkedIn群组时会返回“500内部API服务器错误”,而对于其他一些群组,它会返回状态代码' 202'与其他帐户一起运作良好。
JsonObject share = new JsonObject();
String message = "message ";
share.addProperty("title", message);
share.addProperty("summary", message);
String jsonStr = new Gson().toJson(share);
String shareUrl = "http://api.linkedin.com/v1/group/"+account.getAccountId() + "/posts";
OAuthRequest request = new OAuthRequest(Verb.POST, shareUrl);
request.addHeader("Content-Type", "application/json");
request.addHeader("x-li-format", "json");
request.addPayload(jsonStr);
service.signRequest(token, request);
Response response = request.send();
我们获得"status code 202"
作为某个帐户的回复
和一些帐户返回,
{
"errorCode":0,
"message":"Internal API server error",
"requestId":"I329W0E239",
"status":500,
"timestamp":1418142926436
}
所有其他帐户的效果都很好200
作为回复