我想在分享我的网站链接时添加图片 [英] I want to add image when I share my website link

查看:54
本文介绍了我想在分享我的网站链接时添加图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此处输入图片描述我在我的网站中添加了图片.我想在分享我的网站链接时显示该图片.它仅在 whatsapp 中显示,而不在 facebook 和 Skype 中显示.

enter image description hereI have added image in my website. I want to show that image when I share my website link.It is showing only in whatsapp not in facebook and skype.

我的网站链接是:https://www.telotrovo.it/

我试过这个代码:

<meta property="og:image:secure_url" content="https://www.telotrovo.it/wp-content/uploads/2016/02/siteimage.jpg"/>

<meta property="og:image" content="http://www.telotrovo.it/wp-content/uploads/2016/02/siteimage.jpg"/>

推荐答案

Facebook、Skype 和其他公司正在使用开放图谱协议来获得这些.我在我的网站之一中有这些:

Facebook,Skype and others are using Open Graph Protocol to get those. I have these in one of my sites:

<meta property="og:title" content="Site Title" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://my.website.com" />
<meta property="og:image:url" content="http://my.website.com/images/thumb.png" />
<meta property="og:description" content="Site description" />

并且在Skype和Facebook上显示为链接预览的图像是og:image:url中指定的拇指图像.

And the image displayed as the link preview on Skype and Facebook is the thumb image specified in og:image:url.

这四个应该出现在您的标签中.还要确保将 XML 命名空间添加到标记中:

These four should be present in your tag. Also make sure you add the XML NameSpace to the tag:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:og="http://ogp.me/ns#"
      xmlns:fb="https://www.facebook.com/2008/fbml">  

这篇关于我想在分享我的网站链接时添加图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆