我想与社交媒体分享网页.如果我能提供帮助,我不想使用插件或添加JS脚本.我只想在每种情况下使用一个链接.
我找到了一个页面,解释了如何通过链接在facebook上分享网页;
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fhuebris.com%2Ffacebook-share-button&t=How+to+Share+Content+from+Your+Website+on+Facebook" target="_blank">this link</a>
Run Code Online (Sandbox Code Playgroud)
我还发现了如何在谷歌+上分享链接;
<a href="https://plus.google.com/share?url=' . $url . '" ...
Run Code Online (Sandbox Code Playgroud)
但是,我正在寻找如何共享页面
同样,但我很短暂.似乎有关于共享按钮的复制/粘贴脚本的指南,以及使用每个相应API的指南,但对于使用链接发布这么简单的东西,我似乎根本找不到多少.
请查看这些共享链接,这些链接适用于各种社交网站,无需javascript.
<!-- Facebook -->
<a href="http://www.facebook.com/sharer.php?u=http://www.example.com" target="_blank">Share to FaceBook</a>
<!-- Twitter -->
<a href="http://twitter.com/share?url=http://www.example.com&text=Simple Share Buttons&hashtags=simplesharebuttons" target="_blank">Twitter</a>
<!-- Google+ -->
<a href="https://plus.google.com/share?url=http://www.example.com" target="_blank">Google+</a>
<!-- Digg -->
<a href="http://www.digg.com/submit?url=http://www.example.com" target="_blank">Digg</a>
<!-- Reddit -->
<a href="http://reddit.com/submit?url=http://www.example.com&title=Simple Share Buttons" target="_blank">Reddit</a>
<!-- LinkedIn -->
<a href="http://www.linkedin.com/shareArticle?mini=true&url=http://www.example.com" target="_blank">LinkedIn</a>
<!-- Pinterest -->
<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)());">Pinterest</a>
<!-- StumbleUpon-->
<a href="http://www.stumbleupon.com/submit?url=http://www.example.com&title=Simple Share Buttons" target="_blank">StumbleUpon</a>
<!-- Email -->
<a href="mailto:?Subject=Simple Share Buttons&Body=I%20saw%20this%20and%20thought%20of%20you!%20 http://www.example.com">Email</a>
Run Code Online (Sandbox Code Playgroud)
更新 我没有测试这个href的pinterest,让我知道是否工作.
<!-- Pinterest -->
<a href="http://pinterest.com/pin/create/button/?url={URI-encoded URL of the page to pin}&media={URI-encoded URL of the image to pin}&description={optional URI-encoded description}" class="pin-it-button" count-layout="horizontal">
<img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" />
</a>
Run Code Online (Sandbox Code Playgroud)
如果您对发布此类 URL 的定期更新、维护和清理项目感兴趣,请查看:

(来自 Github 项目的演示图片)
至少 30 个或更多社交分享网络,按类型(语言、平台等)排序,并提供来源。您不想错过一些您最喜欢的:Skype、Google 书签、Tumblr、Blogger、LiveJournal 等,等等。
| 归档时间: |
|
| 查看次数: |
2179 次 |
| 最近记录: |