我正在我的应用程序中实现Disqus,并且一直得到:

{"code":2,"response":"Invalid argument, 'thread': Unable to find thread 'ident:https://www.idevice.ro/2015/04/27/ios-8-4-beta-2'"}

其中https://www.idevice.ro/2015/04/27/ios-8-4-beta-2是URL,在此URL中实现了disqus。

这是我正在 call 的网址。
http://disqus.com/api/3.0/threads/listPosts.json?forum=ideviceromania&thread%3Aident=https%3A%2F%2Fwww%2Eidevice%2Ero%2F2015%2F04%2F27%2Fios-8-4-beta-2&api_secret=<<<API Secret>>>>

谁能解释我在做什么错或可能是什么问题?

最佳答案

我知道它已经很旧了,但是我刚越过这个问题,过了一会儿就设法解决了。 正确的方法是使用thread:link ,而不是thread:ident或thread,而只提供帖子的URL。

https://disqus.com/api/3.0/threads/set.json?api_key=YOUR_API_KEI&forum=forum_short_name&thread:link=http%3A%2F%2Fexample.com%2Fpost_category%2Fpost_slug%2F

提示:
  • 您可以通过查看站点上的“disqus_shortname”变量来找到您的forum_short_name。
  • 获得结果后,您将不会在json上看到返回“comments”值,而您要查找的数字在“posts”上。

  • 希望这对别人有帮助!

    关于ios - 如何修复Disqus无效参数“线程”错误?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29923734/

    10-13 03:59