static
void
current_url
()
static
void
generate_sig
( $params_array, $secret)
static
void
get_facebook_url
([ $subdomain = 'www'])
Tries to undo the badness of magic quotes as best we can
static
string
no_magic_quotes
(string $val)
-
string
$val: Should come directly from $_GET, $_POST, etc.
Facebook
__construct
( $api_key, $secret, [ $generate_session_secret = false])
-
$api_key
-
$secret
-
$generate_session_secret
Clears any persistent state stored about the user, including cookies and information related to the current session in the client.
void
clear_cookie_state
()
void
create_templatizedFeedStory
( $title_template, [ $title_data = array()], [ $body_template = ''], [ $body_data = array()], [ $body_general = null], [ $image_1 = null], [ $image_1_link = null], [ $image_2 = null], [ $image_2_link = null], [ $image_3 = null], [ $image_3_link = null], [ $image_4 = null], [ $image_4_link = null])
-
$title_template
-
$title_data
-
$body_template
-
$body_data
-
$body_general
-
$image_1
-
$image_1_link
-
$image_2
-
$image_2_link
-
$image_3
-
$image_3_link
-
$image_4
-
$image_4_link
void
do_get_session
( $auth_token)
void
encode_feedStory
( $feed, $next)
void
encode_multiFeedStory
( $feed, $next)
void
encode_validationError
( $summary, $message)
void
get_add_url
([ $next = null])
void
get_install_url
([ $next = null])
void
get_loggedin_user
()
void
get_login_url
( $next, $canvas)
void
get_logout_url
( $next)
void
get_valid_fb_params
( $params, [ $timeout = null], [ $namespace = 'fb_sig'])
-
$params
-
$timeout
-
$namespace
Logs the user out of all temporary application sessions as well as their Facebook session. Note this will only work if the user has a valid current session with the application.
void
logout
(string $next)
-
string
$next: URL to redirect to upon logging out
void
set_cookies
( $user, $session_key, [ $expires = null], [ $session_secret = null])
-
$user
-
$session_key
-
$expires
-
$session_secret
void
set_user
( $user, $session_key, [ $expires = null], [ $session_secret = null])
-
$user
-
$session_key
-
$expires
-
$session_secret
void
validate_fb_params
([ $resolve_auth_token = true])
Validates the account that a user was trying to set up an independent account through Facebook Connect.
bool
verify_account_reclamation
(user $user, hash $hash)
-
user
$user: The user attempting to set up an independent account.
-
hash
$hash: The hash passed to the reclamation URL used.
Validates that a given set of parameters match their signature.
Parameters all match a given input prefix, such as "fb_sig".
void
verify_signature
($fb_params $fb_params, $expected_sig $expected_sig)
-
$fb_params
$fb_params: an array of all Facebook-sent parameters, not including the signature itself
-
$expected_sig
$expected_sig: the expected result to check against
Validate the given signed public session data structure with public key of the app that the session proof belongs to.
void
verify_signed_public_session_data
($signed_data $signed_data, [string $public_key = null])
-
string
$public_key: Optional public key of the app. If this is not passed, function will make an API call to get it. return true if the session proof passed verification.
-
$signed_data
$signed_data: the session info that is passed by another app