Catalyst::Model::Facebook - The Catalyst model for the package Facebook
# # Config # <Model::MyModel> app_id 148266808552034 secret 7adde7e516bf42ec914b08c8d075c13d facebook_class Facebook facebook_cookie_class Facebook::Cookie </Model::MyModel> # # Sample controller code # sub index :Chained('base') :PathPart('') :Args { my ( $self, $c ) = @_; if ($c->model('MyModel')->uid) { $c->stash->{facebook_user_profile} = $c->model('Facebook')->graph->query ->find($c->model('MyModel')->uid) ->include_metadata ->request ->as_hashref; } }
This package wraps around the Facebook package. It uses the "facebook_cookie_class" where it gives over "app_id", "secret" and the text of the facebook cookie of this "app_id". This object will be used as cookie attribute for the construction of the "facebook_class".
The application id you got from your http://www.facebook.com/developers application page.
The application secret you got from your http://www.facebook.com/developers application page.
If you want to extend the Facebook class, or want to use an alternative implementation which is compatible, you can set here the class that should be used for this adapter.
With this parameter you can give him a different Facebook::Cookie class which he gives as cookie attribute to the Facebook object on construction.
Catalyst::Helper::Model::Facebook
Facebook
Facebook::Cookie
IRC
Join #facebook on irc.perl.org.
Repository
http://github.com/Getty/p5-catalyt-model-facebook Pull request and additional contributors are welcome
Issue Tracker
http://github.com/Getty/p5-catalyt-model-facebook/issues
Torsten Raudssus <torsten@raudssus.de> http://www.raudssus.de/
Your name could be here.
Copyright (c) 2010 the Facebook "AUTHOR" and "CONTRIBUTORS" as listed above.
This library is free software and may be distributed under the same terms as perl itself.
To install Catalyst::Model::Facebook, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Model::Facebook
CPAN shell
perl -MCPAN -e shell install Catalyst::Model::Facebook
For more information on module installation, please visit the detailed CPAN module installation guide.