UPDATE (Determined):

I believed this out by myself, this isn't recorded anywhere. The array reference passed will need each array item be considered a hash reference using either the a categoryName or categoryId key identifier. Meaning:


'categories' => [

  ,

  ,

],


The question below no more needs responding to...


The next code works fine to upload a brand new publish to some WordPress blog as well as the existence of me I can not appear to obtain the groups to become set.

The groups exist. I have attempted all lower situation, attempted situation-matching, attempted the slug version. Nothing works. Regardless of how I attempt passing the groups, the publish will get designated simply to the default category.

I have searched the net to locate other bits of sample code and none mention the particular code semantics of methods to assign publish to particular groups while using WordPress::XMLRPC module.


use WordPress::XMLRPC

my $o = WordPress::XMLRPC->new

$o->username('username')

$o->password('password')

$o->proxy('http://blogdomain.com/xmlrpc.php')

$o->server()  die "$!"

my $hashref = Publish 999 555456782',

 'categories' => ['Categorie1', 'Categorie2'],

 'description' => '<p>Here may be the content</p>',

 'mt_keywords' => 'tag1, tag2, tag3',

 'mt_allow_comments' => 1,



my $ID = $o->newPost($hashref, 1)

In my opinion this really is fixed, when i didn't have problem doing the next (splitting a comma separated list $groups):

my @categories = split(',', $categories);

my $id = $o->newPost(
 {
      title           => 'title',
        description   => 'description',
        categories    => \@categories,
        mt_keywords      => 'tag1, tag2, tag3',
        mt_allow_comments  => '1',
     },
     0 # Publish?
    );