用于社交书签的 AddThis AddToAny、ShareThis 等的开源替代方案 [英] Open source alternative to AddThis AddToAny, ShareThis etcfor Social Bookmarking

查看:34
本文介绍了用于社交书签的 AddThis AddToAny、ShareThis 等的开源替代方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我尝试重新发明轮子之前,我想我应该咨询专家.

我正在寻找一个多社交书签按钮,让我可以让人们将我网站的特定页面推荐给他们最喜欢的社交网络/页面阅读器/搜索引擎.

限制条件(以及我不想使用 ShareThis 的原因)

  1. 发布的链接必须是实际链接,而不是缩短的链接.人们的名单得到共享.我想要显示我的域的链接.

  2. 脚本应该由我自己的服务器提供.我对从其他域调用脚本的网页表示怀疑,并且我不想从我的域中执行此操作.

  3. 客户和任何社交网站之间不应有任何联系,直到他们点击社交网站图标.

  4. 脚本至少作为源代码应该在内部有详细记录——不需要应用压缩的未注释短变量名脚本.

  5. 脚本嵌入在静态网页中,而不是 CMS.

<小时>

初步研究:

Koehl 博客在 2009 年有一个关于这个的系列,然后这个话题就消失了.那时,他推荐了 iBegin,后来它变成了 Share,并从一个名为 Enthropia.com 的网站运行.检查那个网站,有一个演示发布,显然已经过时了.

一度,AddToAny 允许在您自己的服务器上托管,但他们仍然使用该脚本来跟踪每个用户的网络使用情况,并声称是适当的匿名.对.不用谢.

另一个,OpenLike 有一个死掉的网络服务器.

SourceForge 上的搜索结果为空.(我尝试搜索诸如 AddThis、AddToAny、Sharethis 之类的名称,然后搜索到 stumbleupon、reddit、digg、google plus.没有任何相关性.)

此时,我不得不阅读和理解每个目标站点的 api,以便我可以编写一个执行正确操作的本地脚本.并非微不足道.

在很多方面,理想的情况是:* 一系列大小和样式相似的图标* 每个人都在目标页面上打开了一个网页(例如 FB、G+、StumbleUpon..)* 带有适合该页面的 URL 参数.

但我认为这些网站中的大多数都没有这么简单的界面.

解决方案

答案很简单.上面的理想工作,所以主要是找到正确的代码和图标的问题.我搜索的关键项目是'通过网址分享'

示例 1

这是来自本网站的另一篇文章:

Facebook、Twitter 和 Google +1 个仅使用 HTML 的按钮(无 Javascript)

http://www.facebook.com/sharer.php?u=http://example.comhttp://twitter.com/share?url=http://example.com&text=描述https://plusone.google.com/_/+1/confirm?hl=en&url=http://example.com

示例 2

参见 Wordpress无需 JS 或插件即可分享按钮

虽然这些名义上是 wordpress,但它们应该在任何使用 php 的 Web 服务器上进行一些修改.或者它们可以很容易地转换为使用模板工具包

示例 3:

较少的社交分享链接是另一个例子干净的 HTML.

你错过了一些功能:

  • 没有计数器.当然,您可以在本地实现计数器.
  • 对于 Facebook,人们看不到他们的哪些朋友喜欢它.对我来说不是一个很大的动力.
  • 此时找到每个服务的代码是一个障碍.

规格:

  • 如果有人已经合并了一个按网址共享的列表,请随时在此处发布.我尚未验证以下所有内容.
  • TITLE 是共享标题.一些服务会接受它引用.其他必须是 URL 格式:例如空格是 %20网址必须是完全限定的绝对网址.

博主

http://www.blogger.com/blog_this.pyra?t=&amp;u={url}&amp;n={title}

挖掘

http://digg.com/submit?phase=2&amp;url={url}&amp;title={title}

迪戈

http://www.diigo.com/post?url={url}&amp;title={title}

电子邮件

mailto:?to=&subject={title}&body={url}%0A{description}

脸书

http://www.facebook.com/sharer.php?u={url}&amp;t={title}

gmail

https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=&su={title}&body={url}%0A{描述}

谷歌书签

http://www.google.com/bookmarks/mark?op=add&bkmk={url}&title={title}

链接

http://www.linkedin.com/shareArticle?mini=true&amp;url={url}&amp;title={title}&amp;ro=false&amp;summary={描述}&amp;来源=

我的空间

http://www.myspace.com/Modules/PostTo/Pages/?u={url}&amp;t={title}

兴趣

http://www.pinterest.com/pin/create/button/?url={url}&amp;media={image}&amp;description={title}

红迪网

http://reddit.com/submit?url={url}&amp;title={title}

微博

http://www.tumblr.com/share/link?url={url}&amp;name={title}&amp;description={description}

推特

http://twitter.com/home?status={title}%20{url}

邮箱

http://compose.mail.yahoo.com/?to=&subject={title}&body={url}%0A{description}

Before I attempt to re-invent the wheel, I figured that I'd ask the experts.

I'm looking for a multi-social bookmark button that allows me to allow people to recommend particular pages of my web site to their favorite social network/ page reader/ seach engine.

Constraints (and reasons why I don't want to use ShareThis)

  1. The link posted has to be the actual link, not a shortened link. People's lists get shared. I want the link to show my domain.

  2. The script should be served from my own server. I am suspicious of web pages that call scripts from another domain, and I don't want to do that from my domain.

  3. There should be NO contact between the client and any of the social sites until they click on a social site icon.

  4. Script should be well documented internally at least as source -- compacted uncommented short variable name scripts need not apply.

  5. Script is embedded in a static web page, not a CMS.


Preliminary research:

Koehl blog had a series about this in 2009, then the topic faded. At that point he recomended iBegin, which subsequently became Share, and ran from a site called Enthropia.com. Checking that site, there is a demo posted that is clearly out of date.

At one point AddToAny would allow hosting on your own server, but they still were using the script to track every user's web usage, claiming a suitably anonymity. Right. No thanks.

Another one, OpenLike has a dead webserver.

A search on SourceForge has come up empty. (I tried searching for the names like AddThis, AddToAny, Sharethis, followed by searches to stumbleupon, reddit, digg, google plus. Nothing relevant.)

At this point I'm faced with having to read and understand each target site's api so I can write a local script that does the right thing. Not trivial.

In many ways the ideal would be: * An array of icons in simlarly size and style * that each opened a web page onto the destination page (eg. FB, G+, StumbleUpon..) * with URL parameters appropriate to that page.

But I don't think that most of these sites have such a simple interface.

解决方案

Answer is simple. The ideal above works, so it's mostly a matter of finding the right code and icons. The key item in my search was 'share by url'

Example 1

This is from another post on this site:

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

Example 2

See 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>

While these are nominally wordpress they should work with some modification with any web server using php. Or they can easily be converted to use template toolkit

Example 3:

Less social share links is another example of very clean looking HTML.

You miss some functionality with this:

  • No counters. Of course you could implement counters locally.
  • For Facebook the people don't get to see which of their friends liked it. Not a big motivator for me.
  • At this point finding the codes for each service is an obstacle.

Specifics:

  • If someone has already consolidated a share-by-url list, please feel free to post here. I have NOT verified all of the following.
  • TITLE is the share title. Some services will accept it quoted. Others must be in URL format: e.g. spaces are %20 URL must be fully qualified absolute.

blogger

http://www.blogger.com/blog_this.pyra?t=&amp;u={url}&amp;n={title}

digg

http://digg.com/ submit?phase=2&amp;url={url}&amp;title={title}

diigo

http://www.diigo.com/post?url={url}&amp;title={title}

email

mailto:?to=&subject={title}&body={url}%0A{description}

facebook

http://www.facebook.com/sharer.php?u={url}&amp;t={title}

gmail

https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=&su={title}&body={url}%0A{description}

google bookmark

http://www.google.com/bookmarks/mark?op=add&bkmk={url}&title={title}

linkedin

http://www.linkedin.com/shareArticle?mini=true&amp;url={url}&amp;title={title}&amp;ro=false&amp;summary={description}&amp;source=

myspace

http://www.myspace.com/Modules/PostTo/Pages/?u={url}&amp;t={title}

pinterest

http://www.pinterest.com/pin/create/button/?url={url}&amp;media={image}&amp;description={title}

reddit

http://reddit.com/submit?url={url}&amp;title={title}

tumblr

http://www.tumblr.com/share/link?url={url}&amp;name={title}&amp;description={description}

twitter

http://twitter.com/home?status={title}%20{url}

ymail

http://compose.mail.yahoo.com/?to=&subject={title}&body={url}%0A{description}

这篇关于用于社交书签的 AddThis AddToAny、ShareThis 等的开源替代方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆