首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何添加社交分享按钮?

如何添加社交分享按钮?
EN

Stack Overflow用户
提问于 2015-10-25 14:19:11
回答 1查看 1.8K关注 0票数 1

目前我使用的是由AddThis生成的社交分享按钮。但我想在我的网站上使用相同的分享按钮,而不添加其他网站的代码。

那么,如何开发同样的分享按钮呢?

EN

回答 1

Stack Overflow用户

发布于 2015-10-25 15:48:47

像这样的东西?

代码语言:javascript
复制
<div>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.sahilonline.org%2FnewsDetails.php%3Fcid%3D3%26nid%3D37477&p[title]=BJP got 'Modi oxygen,' will last till popularity remains:Sena&display=popup">
<img src="http://www.sahilonline.org/images/share-f.jpg" width="100" height="30" alt="Share on Facebook"></a>
&nbsp;
<a href="https://twitter.com/intent/tweet?text=BJP got 'Modi oxygen,' will last till popularity remains:Sena&url=http%3A%2F%2Fwww.sahilonline.org%2FnewsDetails.php%3Fcid%3D3%26nid%3D37477&related=">
<img src="http://www.sahilonline.org/images/share-t.jpg" width="100" height="30" alt="Share on Twitter"></a>
&nbsp;
<a href="javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());">
<img alt="Pin it" src="http://www.sahilonline.org/images/share-p.jpg"></a>
&nbsp;
<a href="postComment.php?cid=3&amp;nid=37477"><img src="http://www.sahilonline.org/images/share-c.jpg" width="100" height="30" alt="Leave Your Comment"></a>&nbsp;<a  href="email.php?cid=3&amp;nid=37477">
<img src="http://www.sahilonline.org/images/share-e.jpg" width="100" height="30" alt="Share via Email"></a>&nbsp;<a href="https://plus.google.com/share?url=http%3A%2F%2Fwww.sahilonline.org%2FnewsDetails.php%3Fcid%3D3%26nid%3D37477">
<img src="http://www.sahilonline.org/images/share-g.jpg" width="100" height="30" alt="Google Plus"></a>&nbsp;
</div>

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33326816

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档