Linkedin show 3 different image when sharing

耗尽温柔 提交于 2019-12-21 19:19:21

问题


Linkedin show different 3 image when trying to share. Here is then head tags

<meta property="og:site_name" content="OkyTalk">
<meta property="og:title" content="OkyTalk ">
<meta property="og:type" content="website">
<meta property="og:url" content="https://okytalk.com/teachers/profile/displayProffesional">
<meta property="og:image" content="https://okytalk.com/media/okytalk/img/share.jpg">
<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:width" content="470">
<meta property="og:image:height" content="246">

Any Ideas how to show only one ? Others share(facebook, twitter, google+) works fine.


回答1:


LinkedIn are picking up the images in the img tag for some reason unlike Facebook etc.

The workaround is to change the images in the img tags on the page you are sharing to set the images in CSS and change to img tag to a div.

Add a style like:

#howitworksstudent{
  background: url(https://okytalk.com/media/okytalk/img/how-it-works-student.png);
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
}

and change your img tag to:

<div id="howitworksstudent"/>

Not ideal but gets you around the problem. I have tested this and was able to recreate your initial issue so I know it works.

Hope that helps.



来源:https://stackoverflow.com/questions/30236660/linkedin-show-3-different-image-when-sharing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!