使用jwordpress在WordPress中发布帖子

Kho*_*nde 6 java wordpress posting

我正在使用jwordpress-0.4.jar发布到WordPress安装.

我使用的代码是:

Wordpress wp = new Wordpress(username, password, xmlRpcUrl);
Page recentPost = new Page();
recentPost.setPost_status("Published");
recentPost.setDescription("<ul>" + desc + "</ul>");
recentPost.setCategories(cat);
String pageID=recentPost.getPage_id();
String result = wp.newPost(recentPost, true);
Run Code Online (Sandbox Code Playgroud)

这之前运作良好,但现在当我去发布它进入其调度模式时,我尝试过:

recentPost.setPost_status( "发布时间");

wp.​​newPost(recentPost,true);

但这篇文章仍未发表:

Kri*_*ris 0

尝试使用不同的 WordPress 版本。我已经使用了jwordpress-0.4.jar,它对我来说工作得很好,但不记得我在哪个版本的wordpress上运行它。