The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Facebook::OpenGraph - Facebook OpenGraph API Wrapper

VERSION

version 0.1

SYNOPSIS

        use Facebook::OpenGraph;

        my $fbog = Facebook::OpenGraph->new({
                app_id => '..',
                secret => '..',
                access_token => '...',
        });

        $fbog->post('video.watches',{
                movie => 'http://www.example.com/movie.html'
        });

        my $res = $fbog->get('video.watches',{
                offset  => 0,
                limit   => 25,
        });

        foreach my $action (@{$res->{data}}) {
                $fbog->delete($action->{id});
        }

DESCRIPTION

This distribution provides a wrapper around the Facebook OpenGraph API:

http://developers.facebook.com/docs/opengraph/

METHODS

$fbog->get($action, \%params);

Get existing actions:

        {
                'paging' => {
                        'next' => 'https://graph.facebook.com/me/video.watches?access_token=...&offset=25&limit=25'
                },
                'data' => [
                        {
                                'id' => '137465449710258',
                                'application' => {
                                        'name' => 'Cinemoz (dev)',
                                        'id' => '...'
                                },
                                'start_time' => '0000-00-00T00:00:00+0000',
                                'publish_time' => '0000-00-00T00:00:00+0000',
                                'end_time' => '0000-00-00T00:00:00+0000',
                                'data' => {
                                        'movie' => {
                                                'url' => 'http://example.com/movie.html',
                                                'title' => 'Example Movie',
                                                'type' => 'video.movie',
                                                'id' => '...'
                                        }
                                },
                                'comments' => {
                                        'count' => 0
                                },
                                'from' => {
                                        'name' => 'Sandra Amcdigegjhcd Laustein',
                                        'id' => '100003497570834'
                                },
                                'likes' => {
                                        'count' => 0
                                }
                        }
                ]
        }

$fbog->post($action, \%params);

Post a new action:

        {
                'id' => '...'
        }

$fbog->delete($action_id);

Delete an action

SEE ALSO

Facebook::Graph

AUTHOR

Maroun NAJM <mnajm@cinemoz.com>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2012 by Cinemoz.

This is free software, licensed under:

  The (three-clause) BSD License