I'm trying to automatically post to blogger using Perl's Net::Blogger but it keeps returning false and not posting. The main portion of my code looks like this:
use Net::Blogger;
my $blogger = Net::Blogger->new({
debug => 1,
appkey => '0123456789ABCDEF', # doesn't matter?
blogid => $blogid,
username => $username,
password => $password,
});
my $result = $blogger->newPost({
postbody => \'<p>This is text</p><hr/><p><strong>Whee!</strong></p>',
publish => 1,
});
use Data::Dumper;
print Dumper($result);
Sure enough, $result is 0 and in checking the blog, nothing has been posted. The error I'm getting when I enable debugging is:
Element '' can't be allowed in valid XML message.
Died. at /Library/Perl/5.10.1/SOAP/Lite.pm line 1410.
What am I doing wrong?
If you can suggest an alternative to Net::Blogger, that would be fine.
Update: if I don't enable debugging, it hangs for quite a while when trying to post.