如何为LinkedIn成功实现og:image [英] How to successfully implement og:image for the LinkedIn
问题描述
问题:
- 我正在尝试在网站上实施开放式图形图像,但没有取得很大的成功: http://www .guarenty-group.com/cz/
- 主页完全绕过了og:image标记,内部页面从该页面读取站点中的所有图像,并将og:image作为最后一个选项.
- 其他社交网络在内部页面和主页上均正常运行.
配置:
- 我没有共享按钮或类似按钮,我想要的是能够通过我的个人资料共享链接.
- 图片远远超过300x300px: http://guarenty-group.com/img/gg_seal .png
-
这是我的head标签的样子:
- I have no share buttons or alike, all I want is to be able to share the link via my profile.
- The image is well over 300x300px: http://guarenty-group.com/img/gg_seal.png
Here is how my head tag looks like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Guarenty Group : Pojištění pro nájemce a pronajímatelé</title>
<meta name="keywords" content="" />
<meta name="description" content="Guarenty Group pojišťuje příjem z nájmu pronajímatelům, kauci nájemcům - aby nemuseli platit velkou částku v hotovostí předem - a dále nájemcům pojišťuje příjmy, aby měli na nájem při nemoci, úrazu či nezaměstnání." />
<meta name="image_src" content="http://guarenty-group.com/img/gg_seal.png" />
<meta name="image_url" content="http://guarenty-group.com/img/gg_seal.png" />
<meta property="og:title" content="Pojištění pro nájemce a pronajímatelé" />
<meta property="og:url" content="http://guarenty-group.com/cz/" />
<meta property="og:image" content="http://guarenty-group.com/img/gg_seal.png" />
<meta property="og:description" content="Guarenty Group pojišťuje příjem z nájmu pronajímatelům, kauci nájemcům - aby nemuseli platit velkou částku v hotovostí předem - a dále nájemcům pojišťuje příjmy, aby měli na nájem při nemoci, úrazu či nezaměstnání [...]" />
...
</head>
测试结果:
为了欺骗缓存,我已经使用 http://www测试了该站点.guarenty-group.com/cz/?try = N ,我每次都更改N.奇怪的是,针对N的不同值找到的图像是不同的.有时没有图像,有时有1、2或3个图像,但是每次都有一组不同的图像. 但是,无论如何,我都找不到og:graph中指定的图像!
In order to trick the cache i have tested the site with http://www.guarenty-group.com/cz/?try=N, where I have changed the N every time. The strange thing is that images found for different value of N is different. Sometimes there is no image, sometimes there is 1, 2 or 3 images, but each time there is a different set of images. But, in any case I could not find the image specified in the og:graph!
我的问题:
- https://developer.linkedin.com/documents/setting-display-标签份额在说一件事,而支持论坛上的工作人员在说超过300".有人知道图像的正式最小尺寸是多少(w和h)吗?
- 图像太大吗?
- 我应该使用xmlns,还是不应该使用xmlns还是没关系?
- og:title和og:description标签的最大(和最小)长度是什么?
- https://developer.linkedin.com/documents/setting-display-tags-shares is saying one thing, and the personnel on the support forum is saying "over 300" Does anyone know What is the official minimum dimension of the image (both w and h)?
- Can an image be too large?
- Should I use the xmlns, should I not use xmlns or it doesn't matter?
- What are the maximum (and minimum) lengths for og:title and og:description tags?
当然也欢迎其他任何建议:)
Any other suggestion is of course welcomed :)
预先感谢,加油〜
推荐答案
This answer I found on LinkedIn forums might be of help to you:
伙计们,我花了一整天时间尝试不同的事情.什么工作 我正在使用mata [sic]标签,如下所示:
Guys, I've spent a whole day trying different things. What worked for me is using the mata [sic] tags as following:
<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}" />
只需尝试为每个标签添加前缀(而不是html标签),然后重新登录 用您的LI帐户清除缓存... 发布结果.
Just try to add prefix to every tag (not to html tag), then re-sign in with your LI account to clear the cache... Post your results.
这篇关于如何为LinkedIn成功实现og:image的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!