Create a gist now

Instantly share code, notes, and snippets.

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.

Show comment Hide comment
@thejamesjones

thejamesjones 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

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

@surface2air

This comment has been minimized.

Show comment Hide comment
@surface2air

surface2air Aug 19, 2015

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

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

@steerius

This comment has been minimized.

Show comment Hide comment
@anushakusam

This comment has been minimized.

Show comment Hide comment
@anushakusam

anushakusam Sep 23, 2015

@surface2air Add &media=[Image URL]

@surface2air Add &media=[Image URL]

@charliebutler

This comment has been minimized.

Show comment Hide comment
@charliebutler

charliebutler 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

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.

Show comment Hide comment
@johnholtripley

johnholtripley Jan 28, 2016

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

@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.

Show comment Hide comment
@moizmala

moizmala Mar 15, 2016

Can anyone sharer link for instagram post ?

Can anyone sharer link for instagram post ?

@callard

This comment has been minimized.

Show comment Hide comment
@callard

callard Apr 4, 2016

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

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.

Show comment Hide comment
@undersound

undersound May 15, 2016

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

undersound commented May 15, 2016

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

@Naboum

This comment has been minimized.

Show comment Hide comment
@Naboum

Naboum Jun 6, 2016

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

Naboum commented Jun 6, 2016

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

@tysonchamp

This comment has been minimized.

Show comment Hide comment
@tysonchamp

tysonchamp 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>

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.

Show comment Hide comment
@atb-docaocuong

atb-docaocuong Jul 27, 2016

How about Line ?

How about Line ?

@AngosStudio

This comment has been minimized.

Show comment Hide comment
@AngosStudio

AngosStudio Jan 4, 2017

Instagram have something like Facebook Sharer link?!

Instagram have something like Facebook Sharer link?!

@usamamashkoor

This comment has been minimized.

Show comment Hide comment
@usamamashkoor

usamamashkoor Jul 2, 2017

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

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

@luukScheur

This comment has been minimized.

Show comment Hide comment
@luukScheur

luukScheur Oct 12, 2017

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

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

@OliverJAsh

This comment has been minimized.

Show comment Hide comment
@OliverJAsh

OliverJAsh Oct 24, 2017

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

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

@lalit121

This comment has been minimized.

Show comment Hide comment
@lalit121

lalit121 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 !

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.

Show comment Hide comment
@ykoken

ykoken Jan 31, 2018

instagram ?

ykoken commented Jan 31, 2018

instagram ?

@enriquesoto

This comment has been minimized.

Show comment Hide comment
@enriquesoto

enriquesoto Feb 13, 2018

instagram?

instagram?

@vickymcc

This comment has been minimized.

Show comment Hide comment
@vickymcc

vickymcc Apr 21, 2018

talk about instagram

talk about instagram

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