答案很简单。上述理想是可行的,因此主要是找到正确的代码和图标。我搜索的关键项目是“通过 url 共享”
示例 1
这是来自本网站的另一篇文章:
仅使用 HTML(无 Javascript)的 Facebook、Twitter 和 Google +1 按钮
http://www.facebook.com/sharer.php?u=http://example.com
http://twitter.com/share?url=http://example.com&text=Description
https://plusone.google.com/_/+1/confirm?hl=en&url=http://example.com
示例 2
查看没有 JS 或插件的 Wordpress 共享按钮
<div class="social-button-container">
<div class="share_top_text">Share this post on:</div>
<div class="SocialCustomMenu">
<a class="scmTwitter" href="http://twitter.com/home/?status=<?php the_title();?> - <?php echo wp_get_shortlink();?> via @kenmata "title="Tweet this!">Twitter</a>
<a class="scmFacebook" href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?> - <?php echo wp_get_shortlink();?> "title="Share on Facebook!">Facebook</a>
<a class="scmGoogleplus" href="https://plus.google.com/share?url=<?php the_permalink();?> - <?php echo wp_get_shortlink();?> "title="Share on Google +!">Google +</a>
<a class="scmPinterest" href="http://pinterest.com/pin/create/button/?url=<?php the_permalink();?> - <?php echo wp_get_shortlink();?> "title="Share on Pinterest!">Pinterest</a></a>
</div>
</div>
虽然这些名义上是 wordpress,但它们应该与任何使用 php 的 Web 服务器进行一些修改。或者它们可以很容易地转换为使用模板工具包
示例 3:
较少的社交分享链接是另一个非常干净的 HTML 示例。
你错过了一些功能:
- 没有计数器。当然,您可以在本地实现计数器。
- 对于 Facebook,人们无法看到他们的哪些朋友喜欢它。对我来说不是很大的动力。
- 在这一点上,找到每个服务的代码是一个障碍。
规格:
- 如果有人已经合并了按 URL 共享的列表,请随时在此处发布。我尚未验证以下所有内容。
- TITLE 是共享标题。一些服务会接受它的报价。其他必须是 URL 格式:例如空格是 %20 URL 必须是完全限定的绝对值。
博主
http://www.blogger.com/blog_this.pyra?t=&u={url}&n={title}
掘客
http://digg.com/ submit?phase=2&url={url}&title={title}
迪戈
http://www.diigo.com/post?url={url}&title={title}
电子邮件
mailto:?to=&subject={title}&body={url}%0A{description}
Facebook
http://www.facebook.com/sharer.php?u={url}&t={title}
邮箱
https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=&su={title}&body={url}%0A{description}
谷歌书签
http://www.google.com/bookmarks/mark?op=add&bkmk={url}&title={title}
链接素
http://www.linkedin.com/shareArticle?mini=true&url={url}&title={title}&ro=false&summary={description}&source=
我的空间
http://www.myspace.com/Modules/PostTo/Pages/?u={url}&t={title}
兴趣
http://www.pinterest.com/pin/create/button/?url={url}&media={image}&description={title}
红迪网
http://reddit.com/submit?url={url}&title={title}
棒棒哒
http://www.tumblr.com/share/link?url={url}&name={title}&description={description}
推特
http://twitter.com/home?status={title}%20{url}
邮箱
http://compose.mail.yahoo.com/?to=&subject={title}&body={url}%0A{description}