我想在我的简单网站上添加分享按钮.
发布于 2011-01-26 22:57:46
在Facebook的开发人员文档中,将以下内容插入标记正文:
<iframe src="https://www.facebook.com/plugins/like.php?href=YOUR_URL"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>(确保关闭了iframe标记,在facebook网站上它仍然是打开的。)
对于推特(在论坛上找到):
<a href="https://twitter.com/home?status=Enter status message here"
title="Click to send this page to Twitter!" target="_blank">Tweet This!</a>发布于 2011-01-26 23:02:46
推特按钮是推特推荐的方式,不过,如果你想共享一个链接,像这样的简单链接也能工作:
类似地,http://www.facebook.com/sharer.php?u=也允许共享一个URL。
在不使用JavaScript的情况下,可能有更多的分享方式(我记得有一些特性在推特主页上预置了tweet文本,但现在找不到)。
https://stackoverflow.com/questions/4811050
复制相似问题