通过 URL 发布到 Reddit [英] Post to Reddit via URL

查看:82
本文介绍了通过 URL 发布到 Reddit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过 URL 发布 Reddit 链接?

例如对于 Facebook,你可以这样做

在您的个人资料上分享 Stackoverflow!</a>

Reddit 是否有一个等效的端点,我可以点击它来共享 URL?

有几种方法可以做到这一点,具体取决于您拥有的应用程序类型.

  1. 如果您要制作交互式内容,您可以将用户带到已填写 URL 和标题的提交页面.以下 URL 将打开带有此问题链接的 reddit 提交表单:

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

  2. 如果您只是希望人们能够将您的网站或博客文章提交到 reddit,您可以使用 reddit 按钮改为在您的页面上.

  3. 如果您正在编写需要将 URL 发布到 reddit 的应用程序或脚本,您可以使用 /api/submit 在 reddit API 中的路由.如果提交链接的用户的链接 karma 少于 2,则可能会提供 CAPTCHA.

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?

解决方案

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.

这篇关于通过 URL 发布到 Reddit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆