NAME

Mojolicious::Plugin::Facebook - Interact with Mojo::Facebook

DESCRIPTION

This module helps creating a Mojo::Facebook object.

SYNOPSIS

In startup():

sub startup {
    my $self = shift;
    $self->plugin('Mojolicious::Plugin::Facebook', {
        app_namespace => '...',
    });
}

In a controller:

sub do_stuff {
    my $self = shift;
    my $token = '123456sdfgh98765';

    Mojo::IOLoop->delay(
        sub {
            my($delay) = @_;
            $self->facebook($token)->fetch({}, $delay->begin);
        },
        sub {
            my($delay, $res) = @_;
            $self->render_json($res);
        },
    );
}

METHODS

register

Will register the helper facebook().

COPYRIGHT & LICENSE

See Mojo::Facebook.

AUTHOR

See Mojo::Facebook.