
Untitled
By: a guest on
Apr 18th, 2012 | syntax:
Perl | size: 0.54 KB | hits: 33 | expires: Never
#!/usr/bin/perl
use strict;
use LWP::Simple qw(get);
use JSON;
use utf8;
my $user = $ARGV[0] || die "no user";
my $APIKey = ''; #Get yours at https://code.google.com/apis/console/
die 'oh you forgot to include your API key' if !$APIKey;
my $googlePlus = get "https://www.googleapis.com/plus/v1/people/${user}/activities/public?key=${APIKey}&alt=json";
my $googlePlus = from_json($googlePlus);
for my $googlePost (@{$googlePlus->{items}}) {
my $Post = $googlePost->{'object'}->{'content'};
utf8::decode($Post);
warn $Post;
}