开发者

XML RPC wordpress Anonymous Comments Posting

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 = C开发者_JS百科onvert.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

var wrap =new  WordPressWrapper(textblogUrltemp + "/xmlrpc.php", "", "");

also you need to modify the class-wp-xmlrpc-server.php file and in newComment function allow the anonymous comments


I 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜