首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >有没有办法在使用linkedin share api分享内容的同时添加标题和描述?

有没有办法在使用linkedin share api分享内容的同时添加标题和描述?
EN

Stack Overflow用户
提问于 2020-06-09 18:47:38
回答 1查看 111关注 0票数 0

我正在使用linkedin share api在linkedin上分享帖子,但问题是我无法在上面添加标题和描述。

我使用以下API:

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

要调用的onClick函数定义如下。

代码语言:javascript
复制
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中提到的

代码语言:javascript
复制
<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' />

但是什么都不管用!我仍然不能在帖子上添加要分享的描述。

EN

回答 1

Stack Overflow用户

发布于 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对此只字不提,但所有的真实证据似乎都指向相反的方向。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62280799

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档