NAME

Facebook::Cookie - Analyzed and signed Facebook Cookie reflection

VERSION

version 0.008

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

If you have any suggestion how we can use this package namespace, please suggest to authors listed in the end of this document.

METHODS

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.

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

ATTRIBUTES

METHODS

AUTHOR

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

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Raudssus Social Software & Facebook Distribution Authors.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.