通过REST API(v2)将文章发布到公司LinkedIN页面

问题描述 投票:2回答:2

使用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但这并没有透露发布文章的任何信息,只是检索和删除它们

rest linkedin linkedin-api article
2个回答
2
投票

您可以使用内容实体(contentlocation和thumbnail)将文章分享到您的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"
    }
}

此API端点的文档可在这里找到:

https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/share-api#share-content

希望有帮助!


0
投票

对于新的UGCPost API,您应该使用Create UGC Posts方法(Documentation)。

要使用该方法,在身份验证后,您将使用:

POST https://api.linkedin.com/v2/ugcPosts

作者为您的组织,例如“ urn:li:organization:5590506”。此外,为此,您需要具有以下角色之一的w_organization_social权限:

  • 管理员
  • DIRECT_SPONSORED_CONTENT_POSTER
  • RECRUITING_POSTER
© www.soinside.com 2019 - 2024. All rights reserved.