Skip to content

Instantly share code, notes, and snippets.

@tZilTM
Created February 2, 2020 11:50
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save tZilTM/6eecb26cd8dca3f9f800128c726d6761 to your computer and use it in GitHub Desktop.
Save tZilTM/6eecb26cd8dca3f9f800128c726d6761 to your computer and use it in GitHub Desktop.
Sharer (share) URLs (links) for sharing on LinkedIn, Twitter, Pinterest, Reddit and Facebook (2020-02-02)

Sharer (share) URLs (links) with HTTP GET and URL Query String Parameters (2020-02-02)

**Note: ** Remember to URL-Encode the parameters: https://www.urlencoder.org/

LinkedIn

  • Share Article: https://www.linkedin.com/shareArticle?mini=true&url=<URL>&title=<TITLE>&source=<SOURCE_URL>&summary=<SUMMARY>

Examples:

Twitter

  • Tweet: https://twitter.com/intent/tweet?text=<TEXT>&url=<URL>&hashtags=<COMMA_SEPARATED_TAGS_WITHOUT_HASHES>&via=<TWITTER_HANDLE (i.e. @Twitter)>
  • Retweet: https://twitter.com/intent/retweet?tweet_id=<TWEET_ID>
  • Like: https://twitter.com/intent/like?tweet_id=<TWEET_ID>
  • Mini-Profile: https://twitter.com/intent/user?screen_name=<TWITTER_HANDLE (i.e. @Twitter)>
  • Follow: https://twitter.com/intent/follow?screen_name=<TWITTER_HANDLE (i.e. @Twitter)>

Examples:

Documentation

Pinterest

  • Create (Save/Pin It): https://www.pinterest.com/pin/create/button/?url=<URL>&media=<IMAGE_URL>&description=<DESCRIPTION>
  • Follow User (Business): https://pinterest.com/follow/<Username>
  • Follow Board (Business): https://pinterest.com/follow/<Username>/<BoardName>

Examples:

More info:

Reddit

  • Submit: http://www.reddit.com/submit?url=<URL>&title=<TITLE>

Examples:

Facebook

  • Share: https://www.facebook.com/sharer/sharer.php?u=<URL>

Examples:

Note that additional parameters are no longer supported with this method: Details

References

  1. https://jonsuh.com/blog/social-share-links/
  2. https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet

My Other Works: https://thejaka.com/ https://gist.github.com/tZilTM

@Sadhill94
Copy link

hey, it doesn't work anymore, linkedin doesn't append query parameter anymore but use the canonical url, don't ask me why they did such thing...
Thanks for your gist anyway

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