Setting post tags in wordpress via XMLRPC API when submitting a post?

admin

Administrator
Staff member
I am trying to use WordPress API via XMLRPC to submit new posts. But i can't set the post tags (nor the categories).

Code:
        echo "Adding $term to blog via XMLRPC ...";
        $client = new IXR_Client("http://$blog.wordpress.com/xmlrpc.php");
        $content = array('title'=>$term,
                         'description'=>"All about $term",
                         'category'=>'barvaz,moshe',
                          'tags'=>'tag1,tag2');
        $client->query('metaWeblog.newPost', 0, $username, $password, $content, true);
        $rv = $client->getResponse();
        print_r($rv);

Any idea?