Nit*_*iya 6 seo linkedin meta-tags facebook-opengraph
根据这篇文章,LinkedIn 支持用于链接预览的开放图元标记。我在 HTML 页面的 head 部分添加了所有必需的元标记。
IE。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- Primary Meta Tags -->
<title>This is sample title</title>
<!-- Open Graph / Facebook / LinkedIn -->
<meta property="og:type" content="website">
<meta property="og:title" content="This is sample title">
<meta property="og:description" content='sample description'>
<meta property="og:image" content="image path">
</head>
<body></body>
</html>
Run Code Online (Sandbox Code Playgroud)
但是当我在 LinkedIn 上分享我的链接时,LinkedIn 不会在链接预览中获取描述。
相同的链接在 Facebook 上运行良好,因为 Facebook 也支持开放图元标签。
我错过了什么吗?
是否有任何类型的描述验证?
仅显示这些标签之一...
(此处列出的优先级较高的项目位于顶部)
<meta property='og:image' content='//media.example.com/ 1234567.jpg"/>
<meta property='og:description' content='Description that will show in the preview"/>
您无法显示图像和描述。您可以显示图像或描述,但不能同时显示两者。
资料来源:LinkedIn 支持票#200531-001886。
那可能是你的问题。
如果您完全不确定为什么共享页面的 LinkedIn 预览未正确填充,请尝试以下各项:
og:
标签。example.com
,检查example.com?someFakeArgument=Fake
,这是一个不同的 URL,应该会触发缓存未命中。设置此数据的方法有多种。我看到了以下内容:标准 HTML<head>
标签、oEmbed 数据、API post 配置(需要 appid)以及og:
我们正在处理的经典标签。
您可能有以下任何标签......
<meta property='og:title' content='Title of the article"/>
<meta property='og:url' content='//www.example.com/URL of the article" />
来源:微软 LinkedIn 官方文档。
小智 2
在您指定的所有开放图的元元素中,您错过了ogp的命名空间,该命名空间使用前缀元素指示:prefix="og: http://ogp.me/ns#"
。查看开放图谱指南中的示例:
<html prefix="og: http://ogp.me/ns#">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />
...
</head>
...
</html>
Run Code Online (Sandbox Code Playgroud)
因此,您的元元素没有指向库的链接来确定其值。以下语法可能对您的标记有所帮助:
<!DOCTYPE html prefix="og: http://ogp.me/ns#">
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- Primary Meta Tags -->
<title>This is sample title</title>
<!-- Open Graph / Facebook / LinkedIn -->
<meta property="og:type" content="website">
<meta property="og:title" content="This is sample title">
<meta property="og:description" content='sample description'>
<meta property="og:image" content="image path">
</head>
<body></body>
</html>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5188 次 |
最近记录: |