eqb*_*eqb 3 html html5 facebook
我刚刚注意到Facebook上的共享链接,其预览的图像未包含在页面本身(至少不明显).所以我想知道 - 有什么方法可以指定当使用HTML代码共享链接时缩略图/预览中可以显示哪些图像?
我能想到这样做的唯一方法是在页面上有一个可以在预览中使用的0px图像.这通常是做什么的?
这可以使用facebook open graph meta标签来实现:http: //swarminglabs.com/facebook-open-graph-meta-tags/
<meta property="og:title" content="Awesome, Inc. – We're even more awesome.">
<meta property="og:description" content="Awesome's mission is to take cool to a whole new level.">
<meta property="og:image" content="http://YOURWEBSITE.com/YOURIMAGE.png">
<meta property="og:image:secure_url" content="https://YOURWEBSITE.com/YOURIMAGE.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1500">
<meta property="og:image:height" content="1500">
Run Code Online (Sandbox Code Playgroud)
使用og:image元标记会将图像更改为您想要的图像.