i am posting comments on my blog it works fine but there is one problem that i cannot post anonymous comments using XML-RPC by alexjamesbrown
instead of comment author there is name of admin
here is my code
var wrapper = new WordPressWrapper(textblogUrltemp + "/xmlrpc.php", adminunUser, adminPass);
var post = new Post();
post.title = toPost.VideoTitle;
post.dateCreated = Convert.ToDateTime(toPost.PostingDateTime);
post.description = toPost.VideoCode;
post.postid = wrapper.NewPost(post, true);
var comment = new Comment();
var wrap =new WordPressWrapper(textblogUrltemp + "/xmlrpc.php", adminunUser, adminPass);
comment.author = videoComments.userName;
comment.author_email = videoComments.email;
comment.content = videoComments.Comment;
wrap.NewComment(post.postid, comment);
I resolved it
also you need to modify the
class-wp-xmlrpc-server.php
file and in newComment function allow the anonymous commentsI bumped into this working for WP Remote Control. Very bad idea to unlock anonymous posting through XMLRPC. You can get flooded by Spam as anyone can do it.
The secret is to post the comment and edit it. Two requests but you’re safe. There’s a single method that does it in my class. Regards.
BTW: My class is PHP. I have it written in C++ too but it’s too dependent to my C++ library to publish.