Disqus API 添加评论
我正在尝试通过 Disqus API 从另一个网站向我的博客提交评论。
我正在使用 create 提交评论。我正在使用 API 控制台来尝试一下。我添加了author_id、author_email、评论,但我不确定要添加到线程
或论坛
中。我尝试了我的帖子 ID (256) http://www.myblog.com/?p= 256
但这会返回..
{
"code": 2,
"response": "Invalid argument, 'thread': User does not have write privileges on thread '256'"
}
使用过该 API 的人可以告诉我如何创建评论吗?
I'm trying to submit a comment to my blog from another site via the Disqus API.
I'm using create to submit a comment. I'm using the API console to try it out. I added an author_id, author_email, comment but I'm not sure what to add to thread
or forum
. I tried my post id (256) http://www.myblog.com/?p=256
but that returns..
{
"code": 2,
"response": "Invalid argument, 'thread': User does not have write privileges on thread '256'"
}
Can anyone who used the API please tell me how to create comments?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请记住,“线程”正在寻找的默认值是 Disqus 内部线程 ID(而不是您的情况下的 Wordpress ID)。但是,您可以使用通过 WordPress 插件设置的自定义
disqus_identifier
(在博客文章的源代码中查找该值),或者如果您传递则使用与线程关联的 URL另外,forum=YOUR_SHORTNAME
。因此,您可以通过以下方式选择线程:
Keep in mind that the default value that 'thread' is looking for is a Disqus internal thread ID (rather than the Wordpress ID in your case). However, you can use the custom
disqus_identifier
that is set via the Wordpress plugin (look for that value in the source code of your blog post), or the URL associated with the thread if you passforum=YOUR_SHORTNAME
in addition.So here's how you can select a thread:
您需要向我认为注册了调用 API 的应用程序的“用户”授予写入权限。
请参阅此处:http://disqus.com/api/docs/permissions/
You need to give the 'user' who i presume registered the application thats calling the API write permissions.
See here: http://disqus.com/api/docs/permissions/