facebook 推特. Line 领英 分享功能 带图标(最全,实测可用)

这个问题,我发现目前现网上的资料很少有全的,都是不对。分享要么没图标,要么显示不对。经过采坑,分享记录一下,完全的如下:

<a href="https://twitter.com/share?lang=zh&text=我的世界&url=https%3A%2F%2Ftest.koa.com%2Fregist%3Fid=99" class="share-twitter">Twitter</a>

<a href="https://www.facebook.com/share.php?title=我的世界&u=https%3A%2F%2Ftest.koa.com%2Fregist%3Fid=99" class="share-facebook">Facebook</a>

<a href="https://www.linkedin.com/shareArticle?mini=true&source=str&title=我的世界&url=https%3A%2F%2Fbeta.koa.com%2Fregist" class="share-linkedin">LinkedIn</a>


<a href="https://lineit.line.me/share/ui?url=http%3A%2F%2Ftest.koa.com%2FproductDetails%3FproductId=1543" class="share-linkedin">LinkedIn</a>

图解:

 上面是分享按钮,设置好之后  在要  head 上加上 如下 :这是给 sei抓取的,可以不加

<!-- twitter-->

<meta name="twitter:image" content="https://koa.com/logo_128x128.png" />

<meta name="twitter:creator" content="@veroluiza" />

<meta name="twitter:card" content="summary" />

<meta name="twitter:url"   content="当前分享的链接--可要可不要" />



<!-- facebook -->

<meta property="og:updated_time" content="2019-01-22T21:34:21+00:00" />

<meta property="og:image" content="https://koa.com/logo_128x128.png" />

<meta property="og:image:secure_url" content="https://koa.com/logo_128x128.png" />

<meta property="og:image:width" content="128" />

<meta property="og:image:height" content="128" />

=========================================================================================

那么分享之后的,就会有 图标。 跟标题了。自动带链接过去!!图标必须是要url链接形式,直接写图标文件目录是不行的。

最后一个问题呢,就是领英的分享 带图标的话,图标抓取只认 二级域名, 一级域名不认,虽然不知道为啥,但这是多次实验的结果,欢迎指正!!

推特带图片分享

https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.websiteplanet.com

<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@website_planet" />
<meta name="twitter:description" content="Want to build a website? You don't need technical know-how to buy a domain, choose a web builder, design a logo, and get content online. Read our steps to get you started." />
<meta name="twitter:title" content="How to Build a Website in 2021: Complete Step-by-Step Guide" />
<meta name="twitter:image" content="https://dt2sdf0db8zob.cloudfront.net/wp-content/themes/websiteplanet/img/websiteplanet_image.png" />

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@site_username">
<meta name="twitter:title" content="0079">
<meta name="twitter:description" content="this.isa测试">
<meta name="twitter:creator" content="@creator_username">
<meta name="twitter:image" content="https://dt2sdf0db8zob.cloudfront.net/wp-content/themes/websiteplanet/img/websiteplanet_image.png">
<meta name="twitter:domain" content="www.websiteplanet.com">

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值