FB,TWITTER,G +共享网址和修复预览图像

its*_*sme 5 twitter url sharing facebook-sharer google-plus

我有这些简单的社交分享链接:

FB share link
     <a href="#" class="share-fb" onclick='window.open( "https://www.facebook.com/sharer/sharer.php?u=http://mysite.org", "myWindow", 
                  "status = 1, height = 300, width = 600, resizable = 0" )'></a>

TWITTER share link
<a href="#" class="share-tw" onclick='window.open( "https://twitter.com/intent/tweet?url=http://mysite.org", "myWindow", 
              "status = 1, height = 300, width = 600, resizable = 0" )'></a>
GOOGLE PLUS
 <a href="#" class="share-g" onclick='window.open( "https://plus.google.com/share?url=http://mysite.org", "myWindow", 
              "status = 1, height = 300, width = 600, resizable = 0" )'>
             </a>
Run Code Online (Sandbox Code Playgroud)

这些链接打开一个弹出窗口,共享页面链接.

我想要的是add a fixed site image preview用户要分享的每个链接.

如何添加预览图像,固定,foreach(FB,TWITTER,G +)?

注意:预览图像是指在此照片中显示的图像(链接www.google.it旁边):

在此输入图像描述

对于FB分享者我试过:<meta property="og:image" content="URL of your image" />

但它似乎不起作用

lus*_*chn 12

要使sharer.php正常工作,您应该填写更多的Open Graph Tags.看看这个网站:http://ogp.me/

您始终可以在Facebook调试器中测试您的站点:https://developers.facebook.com/tools/debug 调试器还显示警告/错误,因此非常适合测试.

Twitter没有图片.嗯,这不正确,你必须为你的页面创建一个"Twitter卡".这可以在这里解释:https://dev.twitter.com/docs/cards

关于Google+,这应该有效:

<meta itemprop="image" content="http://www.....">
Run Code Online (Sandbox Code Playgroud)

(在此处比较:http://www.google.com/intl/zh-CN/webmasters/+1/button/index.html)

另请参阅此主题:配置文件中的Google +1生成的Thumbmail