Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
576 views
in Technique[技术] by (71.8m points)

php - Open source alternative to AddThis AddToAny, ShareThis etcfor Social Bookmarking


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...