<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">use WWW::wordpress;
use Data::Dumper;

$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
					
my $wordpress = WWW::wordpress-&gt;new( blog =&gt; 'blog.wordpress.com',
					blog_id =&gt; '000',
					access_token =&gt; 'XXX');					
		


# site info 
$site_info = $wordpress-&gt;site_info;
$post_count = $site_info-&gt;{post_count};
$subscribers_count = $site_info-&gt;{subscribers_count};
print "post_count $post_count \n";
print "subscribers_count $subscribers_count \n";

sleep 10;

# post 
$content = "this is my test body ";
$title = "New Raspberry Pi Model B+";
$tags = "linux";
my $post_data = { content =&gt; $content,title =&gt; $title,tags =&gt; $tags };
$post_info = $wordpress-&gt;post(post_data =&gt; $post_data );
$id = $post_info-&gt;{id};
$URL = $post_info-&gt;{URL};
print "id $id URL $URL  \n";

# edit post 
$new_content = "The Raspberry Pi foundation has just announced the Raspberry Pi B+. The basic specs haven't changed much";
$post_id = 19;
my $post_data = { content =&gt; $new_content};
$status = $wordpress-&gt;edit_post(post_data =&gt; $post_data, post_id =&gt; $post_id);
print "status $status \n";


#follow
my $post_data = { pretty =&gt; 1};
$status = $wordpress-&gt;follow(blog =&gt; 'blog2.wordpress.com',post_data =&gt; $post_data);  
print "status $status \n";
sleep 4;

#unfollow
my $post_data = { pretty =&gt; 1};
$status = $wordpress-&gt;unfollow(blog =&gt; 'blog2.wordpress.com',post_data =&gt; $post_data);  
print "status $status \n";


</pre></body></html>