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

前端之家收集整理的这篇文章主要介绍了php – Linkedin共享网址/不解析开放图前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Linkedin文档可以在 here找到

正如它所说,它需要:

  1. og:title
  2. og:description
  3. og:image
  4. og:url

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

  1. <!-- Jetpack Open Graph Tags -->
  2. <Meta property="og:type" content="article" />
  3. <Meta property="og:title" content="Starbucks Netherlands Intel" />
  4. <Meta property="og:url" content="http://lorentzos.com/starbucks-netherlands-intel/" />
  5. <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..." />
  6. <Meta property="og:site_name" content="dionysis Lorentzos" />
  7. <Meta property="og:image" content="http://lorentzos.com/wp-content/uploads/2013/08/starbucks-intel-nl-238x300.png" />

在Facebook它很棒,或者你可以看到元数据here.然而LinkedIn更顽固,并没有真正解析数据,即使如果你无法在共享的页面中设置Open Graph标签,LinkedIn将尝试通过确定标题,描述,缩略图自动获取内容.

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

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

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

@H_403_13@

猜你在找的PHP相关文章