Facebook::Graph::BatchRequests - Batch Requests
version 1.1201
# set access_token, required my $fb = Facebook::Graph->new(access_token => $access_token); my @batches = $fb->batch_requests ->add_request('sarahbownds') ->add_request({"method" => "POST", "relative_url" => 'me/feed', body => "message=Test update"}) ->request; foreach my $batch (@batches) { print $batch->{code} . $batch->{body} . Dumper(\$batch->{data}, \$batch->{headers}) . "\n"; }
send batch requests to save time: http://developers.facebook.com/docs/reference/api/batch/
A hash or hashref of parameters to pass to the constructor.
An access token string used to make Facebook requests as a privileged user.
add request, if not HASHREF, will default method as GET and arg as relative_url
$batch_requests->add_request('sarahbownds'); # as { method => 'GET', relative_url => 'sarahbownds' } $batch_requests->add_request({"method" => "POST", "relative_url" => 'me/feed', body => "message=Test update"})
$batch_requests->request; $batch_requests->request(@requests);
Fire the request and return decoded @batches data
Facebook::Graph is Copyright 2010 - 2012 Plain Black Corporation (http://www.plainblack.com) and is licensed under the same terms as Perl itself.
To install Facebook::Graph, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Facebook::Graph
CPAN shell
perl -MCPAN -e shell install Facebook::Graph
For more information on module installation, please visit the detailed CPAN module installation guide.