Easiest way to share on facebook, twitter and via email?
On a news-site, the client wants me to implement a way to share a story (just a link, really) via Email, facebook and twitter.
I could write s开发者_如何学JAVAome code for each sharing-method, but it seems very likely, that some sort of service or library would exist, that shares the current url to different services. Maybe even with some tracking on what is shared - for statistic purposes.
Does such a service or library exist?
Check AddThis.com. It supports many services. I looks like this
.AddToAny is a similar service the already suggested to AddThis. Cannot give you pros/cons between them.
Lots more options out there.
Sharethis
Gigya Wildfire
easiest way would be just to include a URL that then sent the user to facebook. In otherwords, forget the Addthis.come and use these:
facebook:
<a href="http://www.facebook.com/sharer.php?u=[url to share]&t=[title of content]">link or image</a>
Twitter:
<a href="http://www.twitter.com/share?url=[url to share]>">link or image</a>
Good luck
精彩评论