LinkedIn Share URL 未填充消息/标题

LinkedIn Share URL is not populating the message / title

这类似于this question

我正在尝试构建一个 url 来填充 post 供某人在 LinkedIn 上分享。在 their guide 之后,我正在使用 url

https://www.linkedin.com/shareArticle
?url=<uriecodedurl>
&mini=true
&title=<uriencodedtitle>
&summary=<uriencodedwords>
&source=<uriencodedwords>

还有来自另一个 SO Q 的 &text=hello

这会创建 post 好吧,但会被重定向并删除除 url 之外的所有查询。 share/post 然后包含带有元标记中的标题和摘要的网站,但我不知道如何 pre-populate post.

中的文本

所以我的问题是,是否可以 pre-populate 一个 post,如果可以,怎么做?

例如,通过推特分享 url,我可以使用 &text=words 填充用户可以在 posting 之前编辑的推文。

如果我是正确的,只有 API 电话可以发表评论, https://developer.linkedin.com/docs/share-on-linkedin

使用 shareURL 的人可以输入评论,但只能通过在重定向页面上按共享按钮。所以不能预定义。

https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.css-tricks.com%2F&title=CSS-Tricks&summary=Tips%2C+Tricks%2C+and+Techniques+on+using+Cascading+Style+Sheets.&source=CSS-Tricks

您的 URL 分享格式已弃用,LinkedIn 不再支持。目前,在 2020 年,url 是唯一可接受的 GET 参数,以下是可接受的共享 URL 格式...

https://www.linkedin.com/sharing/share-offsite/?url={url}

来源:Official LinkedIn Sharing Documentation.

问题一:可以pre-populate留言吗?

不,上面的 share-offsite URL 无法做到这一点。

BUT -- 如果您在 LinkedIn 上注册了一个应用程序 ID,并配置了 LinkedIn 分享插件(不要与LinkedIn Share URL),那么是的,您将能够配置文本。但这是一个完全不同的 API 并且可能有点大。如果你走那条路,那是可能的,否则,就不是。

这里的推理应该是显而易见的。如果没有注册的 App_id,LinkedIn 会担心预填充有害消息,而一旦您拥有 App_id,并使用他们的 API 包,那么您就是使用受信任的身份验证平台的受信任实体等..

问题 2:您可以预填充标题吗?

是的,在 HTML 的 <head> 块中设置 og: 标签,就像这样...

  • <meta property='og:title' content='Title of the article"/>

来源:LinkedIn Developer Docs: Making Your Website Shareable on LinkedIn.