version 0.2
Catalyst::Plugin::Facebook - Build Facebook applications in Catalyst easier
This module adds quick and easy access to WWW::Facebook::API within a Catalyst application.
use Catalyst qw/Facebook/; __PACKAGE__->config( 'facebook' => { 'api_key' => 'api_key_xyz', 'secret' => '12345ddd', } ); sub auto : Private { my ( $self, $c ) = @_; if (! $self->can_display($c)) { return; } return 1; } sub can_display { my ($self, $c) = @_; if (! $c->facebook->canvas->in_fb_canvas()) { $c->res->redirect('http://apps.facebook.com/iplaywow/'); return 0; } if (! $c->facebook->canvas->get_fb_params->{'added'} ) { $c->res->redirect($c->facebook->get_add_url()); return 0; } my $user = $c->facebook->canvas->get_fb_params->{'user'}; if (! $user) { $c->res->redirect($c->facebook->get_login_url()); return 0; } return 1; }
This package uses the 'facebook' configuration namespace. See the WWW::Facebook::API module for all of the configuration options available.
The two required configuration options are 'api_key' and 'secret'.
This method, which will be available on your Catalyst context object, will return the full WWW::Facebook::API object.
fb is just an alias for facebook.
Please report any bugs or feature requests to bug-catalyst-plugin-facebook at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Plugin-Facebook. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-catalyst-plugin-facebook at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Catalyst::Plugin::Facebook
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Catalyst-Plugin-Facebook
CPAN Ratings
http://cpanratings.perl.org/d/Catalyst-Plugin-Facebook
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-Plugin-Facebook
Search CPAN
http://search.cpan.org/dist/Catalyst-Plugin-Facebook
Copyright 2007 Nick Gerakines, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Nick Gerakines <nick@gerakines.net>
This software is copyright (c) 2009 by Nick Gerakines.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Catalyst::Plugin::Facebook, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Plugin::Facebook
CPAN shell
perl -MCPAN -e shell install Catalyst::Plugin::Facebook
For more information on module installation, please visit the detailed CPAN module installation guide.