【问题标题】:Reddit post APIReddit 帖子 API
【发布时间】:2011-08-14 02:18:57
【问题描述】:

我正在尝试遵循 reddit api,如下所述:

https://github.com/reddit/reddit/wiki/API

使用curl登录没问题:

curl -d user=user -d passwd=pass -c Cookie.txt http://www.reddit.com/api/login 

这给了我一个 cookie,其中(我假设)包含我的用户 mod-hash:

4029916%2C2010-04-30T22%3A51%3A52%2C1243925043100000000000000000000000000000

接下来我尝试发布,使用:

curl -d uh=4029916%2C2010-04-30T22%3A51%3A52%2C1243925043100000000000000000000000000000 -d sr=test -d title=test -d r=test -c Cookie.txt http://www.reddit.com/api/submit

但是,我收到一个错误:

[".error.USER_REQUIRED"]

谁能解释我做错了什么/我该如何解决?

【问题讨论】:

    标签: api curl submit reddit


    【解决方案1】:

    看这里:https://github.com/reddit/reddit/wiki/API%3A-login

    请注意,cookie 与 modhash 不同。

    【讨论】:

      猜你喜欢
      • 2020-12-05
      • 1970-01-01
      • 2018-09-19
      • 1970-01-01
      • 1970-01-01
      • 2022-11-10
      • 1970-01-01
      • 2020-02-17
      • 2020-11-08
      相关资源
      最近更新 更多