NAME

Facebook::Graph - An interface to the Facebook Graph API.

VERSION

version 0.0100

SYNOPSIS

Getting started:

my $fb = Facebook::Graph->new(
   app_id          => $facebook_application_id,
   secret          => $facebook_application_secret,
   postback        => 'https://www.yourapplication.com/facebook/oauth/postback',
);

Get the user to authorize your app (only needed if you want to fetch non-public information or publish stuff):

my $url = $fb
   ->authorize
   ->add_permissions(qw(offline_access publish_stream))
   ->to_url;

# redirect the user's browser to $url

Handle the Facebook authorization code postback:

my $q = Plack::Request->new($env);
$fb->request_access_token($q->query_param('code'));

Or if you already had the access token:

$fb->set_access_token($token);

Or you can go without an access token and just get public information.

Get some info:

my $user = $fb->fetch('me');
my $friends = $fb->fetch('me/friends');
my $sarah_bownds = $fb->fetch('sarahbownds);

DESCRIPTION

This is a Perl interface to the Facebook Graph API http://developers.facebook.com/docs/api.

WARNING: This module is experimental at best. The work on it has only just begun because the Graph API itself isn't very new. Therefore things are subject to change drastically with each release, and it may fail to work entirely.

TODO

Basically everything. It has hardly any tests, very little documentation, and very little functionality in it's present form.

METHODS

See the SYNOPSIS for the time being.

NOTE: The fetch method will likely go away and be replaced by individual object types. I just needed something quick and dirty for the time being to see that it works.

PREREQS

Moose JSON LWP URI Crypt::SSLeay

SUPPORT

Repository

http://github.com/plainblack/Facebook-Graph

Bug Reports

http://github.com/plainblack/Facebook-Graph/issues

SEE ALSO

If you're looking for a fully featured Facebook client in Perl I highly recommend WWW::Facebook:API. It does just about everything, it just uses the old Facebook API.

AUTHOR

JT Smith <jt_at_plainblack_dot_com>

LEGAL

Facebook::Graph is Copyright 2010 Plain Black Corporation (http://www.plainblack.com) and is licensed under the same terms as Perl itself.