25

Is it possible to post a link to Reddit via URL?

For example for Facebook you can do

<a href="https://www.facebook.com/sharer/sharer.php?u=http://stackoverflow.com">
  Share Stackoverflow on your profile!
</a>

Does Reddit have an equivalent endpoint I can hit to share a URL?

Don P
  • 60,113
  • 114
  • 300
  • 432

1 Answers1

65

There are several ways to do this, depending on exactly what kind of application you have.

  1. If you're making something interactive, you can take a user to the submit page with a URL and title already filled in. The following URL will open the reddit submit form with a link to this question:

    http://www.reddit.com/submit?url=https://stackoverflow.com/questions/24823114/post-to-reddit-via-url&title=Post%20to%20Reddit%20via%20URL

  2. If you just want people to be able to submit your site or blog post to reddit, you can use a reddit button on your page instead.

  3. If you're writing an app or a script where you need to post a URL to reddit, you can use the /api/submit route in the reddit API. If the user that is submitting the link has less than 2 link karma, then a CAPTCHA will probably be given.

Community
  • 1
  • 1
Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
  • 1
    The first point in your answer is missing the URL to be used. – Sundar R Dec 09 '17 at 17:27
  • 1
    Ah... It seems one of the cosmetic filters from my uBlock, intended to block the "Share this content" type clutter from blogs, is removing this URL as well. I did find it weird that the answer would be uncorrected after all these years, but didn't make the leap. Thanks. – Sundar R Dec 09 '17 at 17:43
  • 1
    Could it be because the URL is http? – Mo Alsaedi Nov 08 '19 at 19:39
  • @sundar-ReinstateMonica: I use uBlock as well and see the URL clearly. – Dan Dascalescu May 30 '20 at 07:46
  • 1
    The link to the reddit button is dead, and here is [a more complete answer](https://stackoverflow.com/a/32533431/1269037) (submission title, text etc.). – Dan Dascalescu May 30 '20 at 07:52