Linkedin共享网址/不解析开放图形

Dio*_*lor 9 php wordpress linkedin opengraph facebook-opengraph

可以在此处找到Linkedin文档

正如它所说,它需要:

og:title
og:description
og:image
og:url
Run Code Online (Sandbox Code Playgroud)

这是我的wordpress博客源代码的一个例子,为简单起见,我使用Jetpack插件:

<!-- Jetpack Open Graph Tags -->
<meta property="og:type" content="article" />
<meta property="og:title" content="Starbucks Netherlands Intel" />
<meta property="og:url" content="http://lorentzos.com/starbucks-netherlands-intel/" />
<meta property="og:description" content="Today I had some free time at work. I wanted to play more with Foursquare APIs. So the question: &quot;What is the correlation of the Starbucks Chain in the Netherlands?&quot;. Methodology: I found all the p..." />
<meta property="og:site_name" content="Dionysis Lorentzos" />
<meta property="og:image" content="http://lorentzos.com/wp-content/uploads/2013/08/starbucks-intel-nl-238x300.png" />
Run Code Online (Sandbox Code Playgroud)

在Facebook它很棒,或者你可以在这里看到元数据.然而,LinkedIn更顽固,甚至没有真正解析数据If you're unable to set Open Graph tags within the page that's being shared, LinkedIn will attempt to fetch the content automatically by determining the title, description, thumbnail image, etc.

我知道我没有og:image:width标签,但Linkedin甚至没有解析标题,描述或网址.任何调试它的想法?

Dio*_*lor 6

我再次检查了我的HTML,并在元数据中发现了一些警告/错误.我修好了,一切都很好.所以解决方案是遇到同样的问题:

再次检查你的HTML并调试它.即使页面在浏览器中很好地加载,LinkedIn解析器在小错误方面也不那么强大.这个工具可能有帮助.

  • 除了修复我们的html和我们的元标记中的错误之外,LinkedIn似乎不愿意刮掉安全页面.将https更改为http是我们让LinkedIn共享工作的最后一步. (2认同)