答案很简单。上述理想是可行的,因此主要是找到正确的代码和图标。我搜索的关键项目是'通过网址分享'
示例 1
这是来自本网站的另一篇文章:
Facebook, Twitter, and Google +1 buttons using only HTML (No Javascript)
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
见Wordpress share buttons without JS or plugins
<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:
Less social share links 是另一个看起来非常干净的 HTML 示例。
你错过了一些功能:
- 没有计数器。当然,您可以在本地实现计数器。
- 对于 Facebook,人们无法看到他们的哪些朋友喜欢它。对我来说不是很大的动力。
- 此时找到每个服务的代码是一个障碍。
具体说明:
- 如果有人已经合并了按 URL 共享的列表,请随时在此处发布。
我尚未验证以下所有内容。
- TITLE 是共享标题。一些服务会接受它的报价。其他必须是 URL 格式:例如空格是 %20
网址必须是完全限定的绝对网址。
博主
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}
脸书
http://www.facebook.com/sharer.php?u={url}&t={title}
gmail
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}
reddit
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}