ros*_*ard 4 article rest linkedin linkedin-api
使用 LinkedIn REST API 的 v2,我正在寻找一种将文章发布到我公司的 LinkedIn 页面的方法。
我已在此处注册https://business.linkedin.com/marketing-solutions/marketing-partners/become-a-partner/marketing-developer-program,目前正在等待批准。
我希望能够在我公司的网站上创建博客文章,当我按“发布”时,我想将该博客文章作为文章发布到我公司的 LinkedIn 页面。
我最接近查找有关此主题的信息的是https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/articles-api 但这并没有透露任何信息张贴文章,只检索和删除它们
您可以使用内容实体(内容位置和缩略图)将文章分享到您的 LinkedIn 公司源。您还可以为要共享的文章提供标题和描述。
与文章共享的示例如下:
{
"owner": "urn:li:organization:12345",
"content": {
"contentEntities": [{
"entityLocation": "https://www.example.com/content.html",
"thumbnails": [{
"resolvedUrl": "https://www.example.com/image.jpg"
}]
}],
"description": "content description",
"title": "Test Company Share with Content"
},
"text": {
"text": "This is a share with an article"
}
}
Run Code Online (Sandbox Code Playgroud)
可以在此处找到此 API 端点的文档:
希望能帮助到你!
对于新的 UGCPost API,您应该使用创建 UGC 帖子方法(文档)。
要使用该方法,在身份验证后,您将使用:
POST https://api.linkedin.com/v2/ugcPosts
Run Code Online (Sandbox Code Playgroud)
将作者作为您的组织,例如“urn:li:organization:5590506”。此外,为此,您需要具有以下角色之一的 w_organization_social 权限: