我正在使用linkedin share api在linkedin上分享帖子,但问题是我无法在上面添加标题和描述。
我使用以下API:
https://www.linkedin.com/sharing/share-offsite/?url={url}&title={}&description={}
要调用的onClick函数定义如下。
const shareViaLinkedin = () => {
window.open(
`https://www.linkedin.com/sharing/share-offsite/?url=${groupToShare}&title=${title}&description=${descrption}`,
'_blank',
'width=700, height=500, left=700, top=280'
)
}标题和描述不起作用
尽管我已经尝试过使用OG meta标签进行分享。正如在https://www.linkedin.com/help/linkedin/answer/46687/making-your-website-shareable-on-linkedin?lang=en中提到的
<meta property='og:title' content='Title of the article'/>
<meta property='og:image' content='//media.example.com/ 1234567.jpg'/>
<meta property='og:description' content='Description that will show in the preview'/>
<meta property='og:url' content='//www.example.com/URL of the article' />但是什么都不管用!我仍然不能在帖子上添加要分享的描述。
发布于 2020-08-01 02:39:55
不幸的是,以下是您的选项,您只能选择其中一个:
该映像具有优先级,因此如果两者都列出,则将使用该映像。我有证据:与LinkedIn支持人员()争论了两周。
除此之外,让我们试着分享一个只有描述和描述和图片的站点。维基百科和GitHub。


维基百科: Description Shows! (But there is NO IMAGE)
GitHub: Image Shows! (But there is NO DESCRIPTION)
我做了一个test site, with only description,,类似地,它也能工作。
经过彻底的测试,这似乎是一个不幸的案例!我再次请求LinkedIn重新考虑他们是如何做到这一点的,但我没有成功。我很清楚Official Microsoft LinkedIn Share Documentation对此只字不提,但所有的真实证据似乎都指向相反的方向。
https://stackoverflow.com/questions/62280799
复制相似问题