[英]Disqus API adding comment
我正試圖通過Disqus API從其他網站向我的博客提交評論。
我正在使用create來提交評論。 我正在使用API控制台來試用它。 我添加了一個author_id,author_email,評論,但我不確定要添加到thread
或forum
。 我嘗試了我的帖子ID(256) http://www.myblog.com/?p= 256
但是返回..
{
"code": 2,
"response": "Invalid argument, 'thread': User does not have write privileges on thread '256'"
}
使用API的任何人都可以告訴我如何創建評論嗎?
請記住,'thread'正在尋找的默認值是Disqus內部線程ID(而不是您的案例中的Wordpress ID)。 但是,您可以使用通過Wordpress插件設置的自定義disqus_identifier
(在博客文章的源代碼中查找該值),或者如果您另外傳遞forum=YOUR_SHORTNAME
,則使用與該線程關聯的URL。
所以這是你如何選擇一個線程:
// Example using Disqus internal ID
POST https://disqus.com/api/3.0/posts/create.json
(your arguments)...
thread=12345678
// Example using disqus_identifier
POST https://disqus.com/api/3.0/posts/create.json
(your arguments)...
thread=ident:256 http://www.myblog.com/?p=256 // This is the schema used in the WP plugin
forum=YOUR_SHORTNAME
// Example using URL (this is the least reliable)
POST https://disqus.com/api/3.0/posts/create.json
(your arguments)...
thread=link:http://www.myblog.com/some_slug
forum=YOUR_SHORTNAME
您需要給我認為已注冊調用API寫入權限的應用程序的“用戶”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.