【问题标题】:How to add Social Sharing buttons?如何添加社交分享按钮?
【发布时间】:2015-10-25 06:19:11
【问题描述】:

目前我正在使用 AddThis 生成的社交分享按钮。 但我想在我的网站上使用相同的分享按钮,而不添加其他网站的代码。

那么,如何开发同一个分享按钮呢?

【问题讨论】:

  • 你的问题很不清楚。您是在问如何创建自己的社交分享按钮,还是在问如何嵌入其他社交分享按钮,如 facebook、twitter 等...?因为如果是前者,您的问题不属于 StackOverflow。相反,您需要阅读这些社交网站的 API/文档,了解如何嵌入其按钮。
  • 这是 addthis 提供的付费服务。
  • 感谢@Sherif bro 的友好回复。请检查屏幕截图。我想使用手动代码。我不想使用由 AddThis、ShareThis 等任何网站提供支持的代码。
  • 感谢@DilDilshan Bro 回复我的询问。但我想使用手动创建的代码。我不想使用其他网站的代码。
  • 我完全不知道你所说的manual代码是什么意思。这些社交网站中的每一个都有关于如何在您的网站上嵌入其共享按钮的详尽而丰富的文档。例如about.twitter.com/resources/buttons developers.facebook.com/docs/plugins/share-button#configurator developers.google.com/+/web/share developers.pinterest.com/tools/widget-builder 仅举几例。我相信谷歌在这里比 StackOverflow 对你更有帮助。正如您将字面意思从他们的文档中复制/粘贴代码一样。

标签: button sharing social currency


【解决方案1】:

类似的东西?

<div>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.sahilonline.org%2FnewsDetails.php%3Fcid%3D3%26nid%3D37477&p[title]=BJP got 'Modi oxygen,' will last till popularity remains:Sena&display=popup">
<img src="http://www.sahilonline.org/images/share-f.jpg" width="100" height="30" alt="Share on Facebook"></a>
&nbsp;
<a href="https://twitter.com/intent/tweet?text=BJP got 'Modi oxygen,' will last till popularity remains:Sena&url=http%3A%2F%2Fwww.sahilonline.org%2FnewsDetails.php%3Fcid%3D3%26nid%3D37477&related=">
<img src="http://www.sahilonline.org/images/share-t.jpg" width="100" height="30" alt="Share on Twitter"></a>
&nbsp;
<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)());">
<img alt="Pin it" src="http://www.sahilonline.org/images/share-p.jpg"></a>
&nbsp;
<a href="postComment.php?cid=3&amp;nid=37477"><img src="http://www.sahilonline.org/images/share-c.jpg" width="100" height="30" alt="Leave Your Comment"></a>&nbsp;<a  href="email.php?cid=3&amp;nid=37477">
<img src="http://www.sahilonline.org/images/share-e.jpg" width="100" height="30" alt="Share via Email"></a>&nbsp;<a href="https://plus.google.com/share?url=http%3A%2F%2Fwww.sahilonline.org%2FnewsDetails.php%3Fcid%3D3%26nid%3D37477">
<img src="http://www.sahilonline.org/images/share-g.jpg" width="100" height="30" alt="Google Plus"></a>&nbsp;
</div>

【讨论】:

  • 如果这是你想要的,那就接受它作为答案
  • 类似这样的东西,但我需要显示在左侧,它应该是浮动的。
猜你喜欢
  • 1970-01-01
  • 2018-08-06
  • 2020-10-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-02-26
相关资源
最近更新 更多