Hi Don,
You could check out Net::Blogger -
http://search.cpan.org/dist/Net-Blogger/- though it hasn't been
updated in a while.
-Eric
On 7/25/05, Don Raikes <d....@draikes.com> wrote:
Hello,
I am fairly new to blogger and to perl.
Does anyone have a working example of how to post to blogger via a perl
script?
I saw an example but it just gavea stub of a program, and when I tried to
make it work, I get an error.
My script is as follows:
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use XMLRPC::Lite;
my $username = "username";
my $password = "password";
my $blogid = "1";
my $proxyurl = 'http://plant.blogger.com/api/RPC2';
my $appkey = "0123456789ABCDEF"; # the value of this is not important,
it's just an ID for your script
my $msg = "This is just a test of my bnp.pl script";
#
#
my $res = XMLRPC::Lite
-> proxy($proxyurl)
-> call('blogger.newPost', $appkey, $blogid, $username, $password,
$msg, 'true')
-> result;
if (defined ($res))
{
print "--success--\n";
print Dumper ($res);
}
else
{
print "failed: $!";
}
When I run the script I get:
failed: Bad file descriptor
Any tips would be greatly appreciated.