【问题标题】:meta property image not working in linkedin元属性图像在linkedin中不起作用
【发布时间】:2016-01-27 08:57:18
【问题描述】:
图像的元属性在 Facebook 中可以正常工作,但在 LinkedIn 中却不行
我正在使用
<meta property="og:image" content='image url' />
我试过了
<meta property="og:image:width" content="180" />
<meta property="og:image:height" content="110" />
但仍然无法在Linkedin中工作
【问题讨论】:
标签:
html
metadata
share
linkedin
facebook-opengraph
【解决方案1】:
尝试以下方法:
<meta prefix="og: http://ogp.me/ns#" property="og:title" content="{Your content}" />
<meta prefix="og: http://ogp.me/ns#" property="og:type" content="{Your content}" />
<meta prefix="og: http://ogp.me/ns#" property="og:image" content="{Your content}" />
<meta prefix="og: http://ogp.me/ns#" property="og:url" content="{Your content}" />
例如:
<meta prefix="og: http://ogp.me/ns#" property="og:image" content="http://image.com/myimage.png" />
或者看看Linkekedin提供的代码:
<html prefix="og: http://ogp.me/ns#">
<head>
<meta property="og:image" content="http://example.com/foo.jpg" />
</head>
<body>
为了在 LinkedIn.com 上获得最高质量的演示文稿,图片
在 og:image 中引用应该至少 80 x 150px 以防止它
避免被人为拉伸以适应布局。