Api 通过WordPressXMLRPC标记帖子

Api 通过WordPressXMLRPC标记帖子,api,wordpress,tags,blogs,xml-rpc,Api,Wordpress,Tags,Blogs,Xml Rpc,我正试图通过XMLRPC API向wordpress博客发布一篇新文章。到目前为止效果还不错,但现在我想在帖子中添加标签。在创建时或之后。但是我在支持的API中找不到任何解决方案 有关于如何通过XMLRPC请求标记新帖子的线索吗?编辑mt_关键字属性。我希望这段代码能有所帮助 import redstone.xmlrpc.XmlRpcClient; import java.util.HashMap; public class wp { public static void main(St

我正试图通过XMLRPC API向wordpress博客发布一篇新文章。到目前为止效果还不错,但现在我想在帖子中添加标签。在创建时或之后。但是我在支持的API中找不到任何解决方案


有关于如何通过XMLRPC请求标记新帖子的线索吗?

编辑mt_关键字属性。

我希望这段代码能有所帮助

import redstone.xmlrpc.XmlRpcClient;

import java.util.HashMap;

public class wp {


public static void main(String args[]){

    System.out.println("Inciando processo de publicação...");


      // Get command-line arguments into variables
      String sXmlRpcURL = "http://localhost/wordpress/xmlrpc.php";
      String sUsername = "admin";
      String sPassword = "mds123";

      // Hard-coded blog_ID
      int blog_ID = 1;

      // XML-RPC method
      String sXmlRpcMethod = "metaWeblog.newPost";

      // We'll hard-code our blog content for now as well
      String sContent = "Hello XML-RPC World! 5";
      String sTitle = "Hello XML-RPC Title 5";

      // Create our content struct
      HashMap hmContent = new HashMap();
      hmContent.put("title", sTitle);
      hmContent.put("description", sContent);
              hmContent.put("mt_keywords", "tag 1, tag 2");


      // You can specify whether or not you want the blog published immediately
      boolean bPublish = true;

      // Try block
      try
      {
        // Create the XML-RPC client

          XmlRpcClient client = new XmlRpcClient( sXmlRpcURL, false );


        // Make our method call
        Object token = client.invoke( sXmlRpcMethod, new Object[] { new Integer( blog_ID ), sUsername, sPassword, hmContent, new Boolean( bPublish ) } );

        // The return is a String containing the postID
        System.out.println( "Posted : " + token.toString() );
      }

      // Catch exceptions
      catch( Exception e )
      {
        e.printStackTrace( System.err );
      }


    System.out.println("Fim do processo de publicação...");

}




}