我们使用的是 LinkedIn API 版本 202306,我们必须使用未记录的方式来提及使用以下内容的人员:
"attributes": [
{
"length": 25,
"start": 0,
"value": {
"com.linkedin.common.MemberAttributedEntity": {
"member": "urn:li:person:ARUhKQtm5a"
}
}
}
]
但是,从版本 202307 开始,这会导致状态错误:422 {“message”:“错误 :: /message/attributes/0/value/com.linkedin.common.MemberAttributedEntity :: 找到但不允许的无法识别的字段 错误::/message/attributes/0/value::“com.linkedin.common.MemberAttributedEntity”不是联合的成员类型”,“status”:422}
我们已经尝试了微软记录的模式[(https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/comments-api?view=li-lms-2024-02&tabs=http #sample-request-body](Sample Request Body)),我们无法让它工作: {"message":"ERROR :: /object :: 字段是必需的,但未找到且没有默认值 “,”状态“:422}
有人成功使用此功能吗?
我已经尝试了所有版本,但它仅适用于202306版本。以下版本无法运行并且没有文档。
POST https://api.linkedin.com/rest/socialActions/urn%3Ali%3Acomment%3A%28urn%3Ali%3Aactivity%3A7146485071443652608%2C7166522137988599809%29/comments HTTP/1.1
x-li-format: json
LinkedIn-Version: 202306
X-Restli-Protocol-Version: 2.0.0
Authorization: Bearer ...
Host: api.linkedin.com
Content-Length: 465
{
"actor": "urn:li:organization:101413098",
"parentComment": "urn:li:comment:(urn:li:activity:7146485071443652608,7166522137988599809)",
"message": {
"text": "Santiago Acosta Ottonelli cierro por SL",
"attributes": [
{
"length": 25,
"start": 0,
"value": {
"com.linkedin.common.MemberAttributedEntity": {
"member": "urn:li:person:ARUhKQtm5a"
}
}
}
]
}
}
此请求适用于 api 版本 202306,但不适用于 202307
是否有任何方法可以通过 linkedin api 版本 202312 或更高版本实现相同的效果?我已经尝试了文档中提供的内容,但似乎返回了以下错误。
"message": "ERROR :: /message/attributes/0/value/com.linkedin.common.MemberAttributedEntity :: unrecognized field found but not allowed\nERROR :: /message/attributes/0/value :: \"com.linkedin.common.MemberAttributedEntity\" is not a member type of union",
"status": 422