- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直将其用作资源:https://github.com/reddit/reddit/wiki/OAuth2-Quick-Start-Example
我正在引用 Curl 示例来获取 token 。
这正是我在终端中运行的内容:
curl -X POST -d 'grant_type=password&username=ollynov14@password=myrealpassword' --user 'jRje7BA55aycvA:myrealsecret' https://www.reddit.com/api/v1/access_token
(当然,我在上面的那些字段中有我的实际 secret 和密码)
我收到以下错误:{"message": "太多请求", "error": 429}
(我从一开始就遇到这个错误,所以我认为它实际上与我运行此 curl 的次数无关)
几个小时前我刚刚注册了 Reddit,以防万一...
有谁知道为什么我可能无法从 Reddit API 获取访问 token ?非常感谢。
最佳答案
它必须包括“用户代理”。请添加一个选项“-A”来 curl 。对于您的 curl 代码,'grant_type=password&username=ollynov14@password=myrealpassword' 是错误的。请将“@”改为“&”。
curl -X POST -A 'User agent' -d 'grant_type=password&username=ollynov14&password=myrealpassword' --user 'jRje7BA55aycvA:myrealsecret' https://www.reddit.com/api/v1/access_token
使用上面的命令,可以得到如下结果。
{"access_token": "#####", "token_type": "bearer", "expires_in": 3600, "scope": "*"}
关于curl - 如何获得 Reddit API 访问 token ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41840497/
Reddit 对于热门帖子有不同的存储桶。他们有“此时”、“今天”、“本周”、“本月”、“今年”、“所有时间”。我能想到的创建这些列表的最佳方法是用时间戳保存每个投票,以便您可以计算每个存储桶的帖子分
我正在尝试使用 praw.reddit 命令抓取 Reddit,但我不断收到以下信息: prawcore.exceptions.OAuthException: unauthorized_client
我正在尝试使用 praw.reddit 命令抓取 Reddit,但我不断收到以下信息: prawcore.exceptions.OAuthException: unauthorized_client
我正在使用 passport-reddit 在我的 node.js 网络服务器上实现 Reddit 登录系统。我现有的系统返回我需要的用户的所有信息,除了他们的电子邮件地址。我想知道社区中是否有人知道
我一直在查看REDDIT api文档,仅通过查看它,似乎无法(?)向另一个Reddit用户发送PM消息。请证明我错了:) 是否可以看到其他用户的 subredddit 订阅? 感谢您提供任何意见。 最
我正在尝试获取帖子上的 self.text 并使用此路线: reddit('/r/Denmark/comments/2jc5yk/how_to_live_in_denmark.json').listi
是否可以通过URL发布指向Reddit的链接? 例如,对于Facebook,您可以 Share Stackoverflow on your profile! Reddit是否具有我可以点击以共
我知道有一种方法可以将链接发布到reddit。 https://www.reddit.com/r/test/submit?title=myTitle&url=http://www.exampledsf
我正在尝试使用 Snoocore 库以编程方式向 Reddit 发布评论。 这是我的代码: function postComment() { var commentText =
我正在制作一个自动回复机器人,该机器人扫描给定命令的r/所有提交评论,例如。 !命令 当它检测到此命令时,将使用字符串回复注释: eg. "Hello" 我得到的错误是新帐户有一个限制,即新帐户每10
我正在尝试获取特定文章的所有 reddit 评论。 在 Reddit API 页面上,似乎暗示: www.reddit.com/r/subreddit/comments/ARTICLE 会给我这些结果
我正在使用 chrome 开发人员工具查看代码,并尝试在我的网站上模拟它,但它的工作方式不同。 显然通过设置边距:0;,边距被删除,但边距在技术上不需要为负数就没有空间了吗? 我没有在 css 格式中
当你点击 reddit 注册按钮时,一个漂亮的窗口弹出,屏幕的其余部分变黑。您可以单击屏幕的其余部分以关闭弹出窗口。 我知道我可以为此使用最外层的 div,但 reddit 是这样做的吗?他们是否也在
Reddit 使用时间衰减算法。这意味着排序顺序可能会发生变化。当用户转到第 2 页时,是否有一种机制可以防止他们看到位于第 1 页但在翻页之前被跳到第 2 页的帖子?这只是排序方法的一个可接受的缺陷
我四处搜寻,找不到有同样问题的人,所以希望这不是多余的。 我试图让 chrome 扩展在每次 Reddit 增强套件加载新页面时修改 DOM(永无休止的自动滚动或其他内容)。 window.addEv
reddit 预览 gif 和图像。我厌倦了发布我的一些页面,但当添加了 html/javascript 时,reddit 不会预览我的 gif。然后我粘贴了一个imgur链接this is te i
我们有一个类似reddit的PHP网站,用户可以为故事投票。 我们尝试在网站上使用 APC、memcached 等,但我们放弃了。问题是我们想要使用缓存机制,但用户可以在网站上随时投票,并且缓存的数据
我有一个接收 Reddit 评论并吐出回复的功能。我希望此函数映射到 Reddit 上发布的每条新评论。 我应该如何从 reddit 获取评论?经常拉取 100 条最近的评论似乎有点浪费,这样就不会遗
我正在尝试异步(或延迟加载)此 Reddit 小部件,但遇到问题。 下面是直接在 html 中完美运行的基本代码: 如果我尝试将其移至我的 scripts.js 中执行其他 jQuery 内
背景:我目前正在使用 praw 制作 Reddit 机器人。 Python 3.7 的库。我的机器人需要做的一件事是检查某些 Reddit 子版 block 上的最新帖子,看看它们是否仅包含图像而没有
我是一名优秀的程序员,十分优秀!