Я использую API-интерфейс linkedin V2.Когда я отправляю сообщение с новыми строками, он возвращает эту ошибку
1. Hello how are you all. (this will be posting fine to linkedin)
2. Hello
how are you all ( this returns error)
posting code:
$share_content='{
"author": "urn:li:person:'.$profile_id.'",
"lifecycleState": "PUBLISHED",
"specificContent": {
"com.linkedin.ugc.ShareContent": {
"shareCommentary": {
"text": "'.$postcontent.'"
},
"shareMediaCategory": "NONE"
}
},
"visibility": {
"com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
}
}';
{"serviceErrorCode":0,"message":"Error parsing request body to json Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value\n at [Source: (com.linkedin.data.ByteString$ByteArrayVectorInputStream); line: 7, column: 44]","status":400}
, если в сообщении есть двойные кавычки.Это также возвращает эту ошибку.