Skip to content

Instantly share code, notes, and snippets.

@dinhtungdu
Last active April 18, 2018 04:28
Show Gist options
  • Save dinhtungdu/ca0e0fb7eb9d51578c1a59288f608d5d to your computer and use it in GitHub Desktop.
Save dinhtungdu/ca0e0fb7eb9d51578c1a59288f608d5d to your computer and use it in GitHub Desktop.
Complete list of share url for social media network using only get parameters

#Create sharing button by just using URL with get parameters, no iframe or javascript require

##For creating Button Use this inline javascript for creating sharing popup windows with ease.

onclick="javascript:window.open(this.href,
  '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"

##Facebook

<a href="http://www.facebook.com/sharer.php?u={URL}">
  Facebook
</a>

Parameters

  • u: URL to share

##Twitter

<a href="https://twitter.com/intent/tweet?url={URL}&text={Text to Share}&via={username}">
  Twitter
</a>

Parameters

  • url: URL to share
  • text: Pre-filled text to tweet (url encoded)
  • via: Twitter username

##Google Plus

<a href="https://plus.google.com/share?url={URL}">
  Google
</a>

Parameters

  • url: URL to share
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment