Social sharing widgets are everywhere these days and on a growing number of sites they even follow you down the page just so you're blatantly aware of where they are at all times.
This is an issue I wrote about in my recent website redesign post and after seeing this tweet :
— Zach Inglis (@zachinglis) May 1, 2012
I thought I'd share how to create a simple share link to Facebook, Twitter & Google+ all of which can be seen in action below this post:
<a href="http://www.facebook.com/sharer/sharer.php?u=YOUR-URL-HERE">Share to Facebook</a>
With Twitter - you can include additional parameters to the share link, such as some text and an associated username too:
<a href="https://twitter.com/intent/tweet?text=SOME-CUSTOM-TEXT&url=YOUR-URL-HERE&via=YOUR-TWITTER-USERNAME">Share to Twitter</a>
<a href="https://plusone.google.com/_/+1/confirm?hl=en&url=YOUR-URL-HERE">Share to Google+</a>
I'm sure there are similar examples for other networks out there - it's essentially just linking to the share box but with some predetermined parameters in places.Social media Website design Website development
Mark Allen says:Great post, useful reference point. If you're not using the OGP for Facebook to get the data for the share, you can send parameters like this http://www.facebook.com/sharer.php? s=100 &p[url]=http://www.mysharedsite.com &p[images]=http://www.mysharesite.com/img/cool-image.jpg &p[title]=My Great Title &p[summary]=Look at this great article about great things. Of course, you may want to urlencode the parameters too.
02 Dec 2012
Emil says:Great! My website was significantly slower and I had to remove it but now I can put it back!
27 Jan 2013
gavsiu says:I like how you actually implement what you talk about on your own site, unlike other blogs.
09 Mar 2013