我正在尝试将图像发布到组织linkedin页面。我正在处理以下文档:https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/ugc-post-api
到目前为止,我的工作如下:
当我尝试使用shareMediaCategory类型“ IMAGE”发布到组织时,收到以下错误响应:
{
"message": "Internal Server Error",
"status": 500
}
以下是网址:
https://api.linkedin.com/v2/ugcPosts
标题(我尝试过使用和不使用所有这些标题):
Authorization:Bearer REDACTED
Content-Type:application/json
X-Restli-Protocol-Version:2.0.0
x-li-format:json
身体:
{
"author":"urn:li:organization:2414183",
"lifecycleState":"PUBLISHED",
"specificContent":{
"com.linkedin.ugc.ShareContent":{
"shareCommentary":{
"text":"Hello"
},
"shareMediaCategory":"IMAGE",
"media":[
{
"status": "READY",
"description":{
"text":"Here is the description"
},
"media":"urn:li:digitalmediaAsset:C4E22AQFdCtnVOTxQCQ",
"title":{
"text":"This is the title"
}
}
]
}
},
"visibility":{
"com.linkedin.ugc.MemberNetworkVisibility":"PUBLIC"
}
}
组织ID是LinkedIn测试组织ID:https://developer.linkedin.com/docs/guide/v2/organizations/development-testing
我可以将文章发布到该ID,但是图像500张。
我已经测试过图像已成功上传。