Linkedin分享没有选择og:图像

时间:2017-06-05 15:35:37

标签: linkedin linkedin-api socialshare

我正在在linkedin上实现帖子共享,我希望url og:图像在共享帖子时显示在linkedin上。但即使我已将正确的URL添加到og:image元标记。在分享帖子后,它不会出现在分享对话中。

这是我用来分享我在linkedin上的帖子的网址:

https://www.linkedin.com/shareArticle?mini=true&url=http://my_website.com:9000/post/40420&title=Test&summary=Description&source=MyWebsite

4 个答案:

答案 0 :(得分:2)

昨晚我遇到了同样的问题。花了数小时研究解决方案,但无济于事。最后,我就此问题联系了LinkedIn,他们立即做出了回应。他们的开发团队已实现了一个名为“ Post Inspector”的新工具,该工具使您可以优化内容共享。从字面上看,这在短短几分钟内就有效了。

所有您需要做的就是输入您的URL,他们将完成所有繁琐的工作,即验证属性的正确代码,例如图像,作者,标题,描述,出版日期等。他们不仅进行验证,还会告诉您要包括的代码,缺少的代码以及解决方法。

这是使用Post Inspector的网站:

https://www.linkedin.com/post-inspector/

答案 1 :(得分:1)

LinkedIn有共享的要求:

以下是必须存在的og:标签及其正确的格式:

  • <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" />

以下是LinkedIn共享模块特有的图像要求:

  • 最大文件大小:5 MB
  • 最小图像尺寸:1200(w)x 627(h)像素
  • 推荐比例:1.91:1

您可以找到更多详细信息  在这里:https://www.linkedin.com/help/linkedin/answer/46687/making-your-website-shareable-on-linkedin?lang=en

答案 2 :(得分:0)

我花了一个小时才弄清楚。

将图像标签紧接 <head>之后。

<head>
<meta
    name="image"
    property="og:image"
    content="https://2d-array-rotation.com/static/images/2d_array_rotation.jpg"
>

有时软件工程师会使事情复杂化。

答案 3 :(得分:-1)

<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" />
相关问题