使用XML-RPC wp API 中的wp.newComment,可以发布匿名的评论到自己的Wordpress.
首先要安装一个插件:http://www.thepicklingjar.com/code/anonymous-xmlrpc-comments/
然后在Wordpress的后台里允许匿名评论
然后在使用wp.newComment的时候,username和password留空,但是comment数组中,author和author_email是必须的.
这篇文章里说的http://wordpress.org/support/topic/304306?replies=1#post-1188046
If you are passing in a valid username & password for the second and third arguments to the wp.newComment XML-RPC method then the login will always succeed (even for anonymous comments) and WP will use the email, URL, name values for that user over the ones submitted as part of the comment.
I suggest leaving the username and password arguments blank when calling wp.newComment. Then then login will fail, but with the right filter in place anonymous comments are still allowed. So the email, URL and name submitted with the comment will be used.

本文介绍如何通过安装特定插件并在WordPress中启用相应设置,利用XML-RPC API中的wp.newComment方法来发布匿名评论。为了成功实现这一功能,需要确保在调用方法时不传递用户名和密码,而author和author_email字段则是必需的。
687

被折叠的 条评论
为什么被折叠?



