NAME
Facebook::Signed - Signed values given by Facebook to an application
VERSION
version 0.102
SYNOPSIS
my $signed = Facebook::Signed->new(
cookie_param => $cookie_as_text,
secret => $secret,
);
OR
my $signed = Facebook::Signed->new(
canvas_param => $canvas_as_text,
secret => $secret,
);
OR
my $signed = Facebook::Signed->new(
secret => $secret,
);
my $custom_value = $signed->get('custom_key');
# shortcuts, return undef if not existing
my $fb_uid = $signed->uid;
my $fb_access_token = $signed->access_token;
my $fb_session_key = $signed->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
canvas_param
Is a: String
This data is used for getting the signed values. Either this parameter or cookie_param (ONLY ONE) is required on construction.
cookie_param
Is a: String
This data is used for getting the signed values. Either this parameter or canvas_param (ONLY ONE) is required on construction.
secret
Is a: String
This is the secret for your application. It's required on construction.
$obj->get
Arguments: $key
Return value: Str
Returns the value of a specific key of the signed values or undef it this is not exist.
Facebook::Signed::check_canvas_payload
Arguments: $facebook_data, $app_secret
Return value: HashRef
Checks the signature of the given facebook data from canvas with the given application secret and gives back the checked HashRef or an empty one.
Facebook::Signed::check_cookie_payload
Arguments: $facebook_data, $app_secret
Return value: HashRef
Checks the signature of the given facebook data from a cookie 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 signed values given
$obj->access_token
Arguments: None
Return value: String
Gives back the signed access_token of the signed values given
$obj->session_key
Arguments: None
Return value: String
Gives back the signed session_key of the signed values given
$obj->expires
Arguments: None
Return value: Integer
Gives back the signed expire date as timestamp of the signed values given
$obj->base_domain
Arguments: None
Return value: String
Gives back the signed base_domain of the cookie given
ATTRIBUTES
METHODS
AUTHORS
Torsten Raudssus <torsten@raudssus.de> http://www.raudssus.de/
Frank Sheiness <syndesis@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 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.