无需脚本的社交媒体共享[关闭]

2024-01-03

我想与社交媒体分享网页。我不想使用插件,或者添加 JS 脚本(如果可以的话)。我只想在每种情况下使用一个链接。

我找到了一个page http://huebris.com/facebook-share-button/解释了如何通过链接在 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>

我还找到了如何通过链接在 google+ 上分享;

<a href="https://plus.google.com/share?url=' . $url . '" ...

但是,我正在寻找如何共享页面

  • 领英
  • 兴趣
  • Twitter

也是,但我还不够。似乎有关于共享按钮的复制/粘贴脚本的指南,以及使用每个相应 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>

Update我没有测试 pinterest 的这个 href,请告诉我是否有效。

<!-- 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>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无需脚本的社交媒体共享[关闭] 的相关文章

随机推荐