NAME

Facebook::Cookie - Analyzed and signed Facebook Cookie reflection

SYNOPSIS

  my $fb_cookie = Facebook::Cookie->new(
    cookie => $cookie,
	secret => $secret,
  );

  my $fb_cookie = Facebook::Cookie->new(
    catalyst_request => $c->req,
	app_id => $app_id,
	secret => $secret,
  );
  
  my $fb_uid = $fb_cookie->uid;
  my $fb_access_token = $fb_cookie->access_token;
  my $fb_session_key = $fb_cookie->session_key;

DESCRIPTION

ATTRIBUTES

Is a: String

This cookie is used for checking the data, if its not there you must give catalyst_request and app_id, so that it can be taken from there.

catalyst_request

Is a: Catalyst::Request

If there is no cookie given, this is used in combination with app_id

secret

Is a: String

This is the secret for your application, its required for nearly all features of this framework.

app_id

Is a: String

This is the application id, also required for nearly all features of this framework.

METHODS

Facebook::Cookie::check_payload

Arguments: $cookie, $app_secret
Return value: HashRef

Checks the signature of the given cookie (as text) with the given application secret and gives back the checked HashRef or an empty one

$obj->uid

Arguments: None
Return value: Integer

Gives back the signed uid of the cookie given

$obj->access_token

Arguments: None
Return value: String

Gives back the signed access_token of the cookie given

$obj->session_key

Arguments: None
Return value: String

Gives back the signed session_key of the cookie given

$obj->expires

Arguments: None
Return value: Integer

Gives back the signed expire date as timestamp of the cookie given

$obj->base_domain

Arguments: None
Return value: String

Gives back the signed base_domain of the cookie given

LIMITATIONS

TROUBLESHOOTING

SUPPORT

IRC

Join #facebook on irc.perl.org.

Repository

 http://github.com/Getty/p5-facebook
 Pull request and additional contributors are welcome

Issue Tracker

http://github.com/Getty/p5-facebook/issues

AUTHOR

Torsten Raudssus <torsten@raudssus.de> http://www.raudssus.de/

CONTRIBUTORS

COPYRIGHT

Copyright (c) 2010 the Facebook "AUTHOR" and "CONTRIBUTORS" as listed above.

LICENSE

This library is free software and may be distributed under the same terms as perl itself.

9 POD Errors

The following errors were encountered while parsing the POD:

Around line 56:

You forgot a '=back' before '=head2'

Around line 73:

You forgot a '=back' before '=head2'

Around line 90:

You forgot a '=back' before '=head2'

Around line 117:

You forgot a '=back' before '=head1'

Around line 152:

You forgot a '=back' before '=head2'

Around line 169:

You forgot a '=back' before '=head2'

Around line 186:

You forgot a '=back' before '=head2'

Around line 203:

You forgot a '=back' before '=head2'

Around line 220:

You forgot a '=back' before '=head2'