From: Budrica Petre Cosmin Date: Thu, 23 Jul 2009 13:51:39 +0000 (+0000) Subject: s/key/api_key/, update pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Authentication-Credential-FBConnect.git;a=commitdiff_plain;h=d6fd78f6f47489b670212e26067593e288f587e9 s/key/api_key/, update pod --- diff --git a/lib/Catalyst/Authentication/Credential/FBConnect.pm b/lib/Catalyst/Authentication/Credential/FBConnect.pm index 5ad90b8..c87785e 100644 --- a/lib/Catalyst/Authentication/Credential/FBConnect.pm +++ b/lib/Catalyst/Authentication/Credential/FBConnect.pm @@ -7,7 +7,7 @@ use Catalyst::Exception (); use namespace::autoclean; has debug => ( is => 'ro', isa => Bool, ); -has key => ( is => 'ro', isa => NonEmptySimpleStr, required => 1 ); +has api_key => ( is => 'ro', isa => NonEmptySimpleStr, required => 1 ); has secret => ( is => 'ro', isa => NonEmptySimpleStr, required => 1 ); has app_name => ( is => 'ro', isa => NonEmptySimpleStr, required => 1 ); has fbconnect => ( is => 'ro', lazy_build => 1, init_arg => undef, isa => 'WWW::Facebook::API' ); @@ -25,6 +25,7 @@ sub BUILD { sub _build_fbconnect { my $self = shift; + WWW::Facebook::API->new( desktop => 0, map { $_ => $self->$_() } qw/ app_name api_key secret / @@ -57,7 +58,6 @@ sub authenticate { return; } else { - $c->res->redirect( $self->fbconnect->get_login_url( next => $c->uri_for( $c->action, $c->req->captures, @{ $c->req->args } ) ) ); } @@ -89,19 +89,19 @@ In MyApp.pm In myapp.conf - - default_realm facebook - - + + default_realm facebook + + - class FBConnect - - key my_app_key - secret my_app_secret - app_name my_app_name - - - + class FBConnect + api_key my_app_key + secret my_app_secret + app_name my_app_name + + + + In controller code,