Domanda

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.

È stato utile?

Soluzione

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}

Altri suggerimenti

additions to @Sherwood Botsford's list

flipboard http://share.flipboard.com/flipit/load?v=1.0&url=URL&title=TITLE

tumblr http://www.tumblr.com/share/link?url=URL&name=TITLE&description=TITLE

blogger http://www.blogger.com/blog_this.pyra?t=&u=URL&n=TITLE

evernote http://www.evernote.com/clip.action?url=$URL&title=TITLE

getpocket http://getpocket.com/save?url=$URL&title=TITLE

Edit - lyteshare.js is a lite javascript could be improved upon to add more services

More sources for more links

Two very comphrensive lists:

ss.js on github gives this pinterest share - which works for anything never pinned before, no script though pinterest

https://pinterest.com/pin/create/bookmarklet/?url={url}&media={image}&is_video={is_video}&description={title}

netvibes custom sharing with Buffer, Baidu, hootsuite and more

Anyone saw the news that AddThis is using a new form of tracking cookies called Fingerprint Canvas that stays forever?

http://www.propublica.org/article/meet-the-online-tracking-device-that-is-virtually-impossible-to-block

I think we need some open source alternatives like http://expando.github.io/

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top