Instantly share code, notes, and snippets.

Embed
What would you like to do?
share url's for facebook, twitter, pinterest with just get variables
<ul>
<li class="share-text">Share this>/li>
<li class="share-tw"><a href="http://twitter.com/share?text=[title]"><span></span></a></li>
<li class="share-fb"><a href="http://www.facebook.com/sharer.php?u=/node/[nid]&p=[title]"><span></span></a></li>
<li class="share-pinterest"><a href="http://pinterest.com/pin/create/button/?url=/node/[nid]&description=[title]"><span></span></a></li>
</ul>

Creating share buttons with just URL's

Twitter

http://twitter.com/share?text=<TITLE>&url=<URL>

E.g. http://twitter.com/share?text=This+is+google+a+search+engine&url=https%3A%2F%2Fwww.google.com

Facebook

http://www.facebook.com/sharer.php?u=<URL>&p[title]=<TITLE>

E.g. http://www.facebook.com/sharer.php?u=https%3A%2F%2Fwww.google.com%[title]=This+Is%2C+Google+a+search+engine

Pinterest

http://pinterest.com/pin/create/button/?url=<URL>&description=<TITLE>

E.g http://pinterest.com/pin/create/button/?url=https%3A%2F%2Fwww.google.com&description=This+is+google+a+search+engine

@thejamesjones

This comment has been minimized.

thejamesjones commented Apr 26, 2014

Thought I would add the url for Linkedin. I just deployed this on my blog and works beautifully.

Linkedin

http://www.linkedin.com/shareArticle?mini=true&url=[path]&title=[title]&summary=[description]&source=[domain]

More info here: https://developer.linkedin.com/documents/share-linkedin

@asifsomy

This comment has been minimized.

@tylertadej

This comment has been minimized.

@surface2air

This comment has been minimized.

surface2air commented Aug 19, 2015

How can you attach an image using the share link example for Pinterest?

@steerius

This comment has been minimized.

@anushakusam

This comment has been minimized.

anushakusam commented Sep 23, 2015

@surface2air Add &media=[Image URL]

@charliebutler

This comment has been minimized.

charliebutler commented Jan 14, 2016

Twitter are using Tweet Web Intent now.

Share? will still redirect automatically, but if you want to set up the URL, it'd look something like this:

https://twitter.com/intent/tweet?text=This%20is%20google%20a%20search%20engine&hashtags=searchengine,google&url=https%3A%2F%2Fwww.google.com&via=google

https://dev.twitter.com/web/tweet-button/web-intent

@johnholtripley

This comment has been minimized.

johnholtripley commented Jan 28, 2016

@surface2air It looks as if you can add &media={image URL} and this will pass the image you want

@moizmala

This comment has been minimized.

moizmala commented Mar 15, 2016

Can anyone sharer link for instagram post ?

@callard

This comment has been minimized.

callard commented Apr 4, 2016

In case some you want to share on Linked In :
https://developer.linkedin.com/docs/share-on-linkedin

@undersound

This comment has been minimized.

undersound commented May 15, 2016

Missing a closing tag on the first li
http://pastebin.com/XVK69cEF

@Naboum

This comment has been minimized.

Naboum commented Jun 6, 2016

Apparently Instagram doesn't allow to upload images through their API

@tysonchamp

This comment has been minimized.

tysonchamp commented Jun 22, 2016

image pin it button: my code <a class="info" target="_blank" data-pin-do="buttonPin" href="https://www.pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&media=<?php echo $image[0]; ?>&description=<?php the_title(); ?>" data-pin-custom="true"><i class="fa fa-pinterest"></i></a>

@atb-docaocuong

This comment has been minimized.

atb-docaocuong commented Jul 27, 2016

How about Line ?

@AngosStudio

This comment has been minimized.

AngosStudio commented Jan 4, 2017

Instagram have something like Facebook Sharer link?!

@usamamashkoor

This comment has been minimized.

usamamashkoor commented Jul 2, 2017

@AngosStudio did you find anything for Instagram share..?!

@luukScheur

This comment has been minimized.

luukScheur commented Oct 12, 2017

Mail share
mailto:?subject=[title]&amp;body=[URL]

@OliverJAsh

This comment has been minimized.

OliverJAsh commented Oct 24, 2017

Pinterest doesn't seem to honour the provided description unless you also provide a media.

@lalit121

This comment has been minimized.

lalit121 commented Dec 16, 2017

example "a class="twitter-share-button" href="https://twitter.com/intent/tweet?url=https://www.example.com&text=Hello"
How to Add Image url in this Twitter Share Button ??
Please Replay me !

@ykoken

This comment has been minimized.

ykoken commented Jan 31, 2018

instagram ?

@enriquesoto

This comment has been minimized.

enriquesoto commented Feb 13, 2018

instagram?

@vickymcc

This comment has been minimized.

vickymcc commented Apr 21, 2018

talk about instagram

@MBK8303

This comment has been minimized.

MBK8303 commented Jun 13, 2018

How we can get response in Asp.Net Application from Facebook, LinkedIn and other social media platform when we share content from Asp.Net that content upload successfully or not.

@m-aluya

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment