Class Facebook

Description

Located in /sources/facebook/facebook.php (line 45)


	
			
Variable Summary
Method Summary
static void current_url ()
static void generate_sig ( $params_array,  $secret)
static void get_facebook_url ([ $subdomain = 'www'])
static string no_magic_quotes (string $val)
Facebook __construct ( $api_key,  $secret, [ $generate_session_secret = false])
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])
void do_get_session ( $auth_token)
void encode_feedStory ( $feed,  $next)
void encode_multiFeedStory ( $feed,  $next)
void encode_validationError ( $summary,  $message)
void expire_session ()
void get_add_url ([ $next = null])
void get_canvas_user ()
void get_install_url ([ $next = null])
void get_login_url ( $next,  $canvas)
void get_logout_url ( $next)
void get_valid_fb_params ( $params, [ $timeout = null], [ $namespace = 'fb_sig'])
void in_fb_canvas ()
void in_frame ()
void logout (string $next)
void promote_session ()
void redirect ( $url)
void require_frame ()
void require_login ()
void set_cookies ( $user,  $session_key, [ $expires = null], [ $session_secret = null])
void set_user ( $user,  $session_key, [ $expires = null], [ $session_secret = null])
void validate_fb_params ([ $resolve_auth_token = true])
bool verify_account_reclamation (user $user, hash $hash)
void verify_signature ($fb_params $fb_params, $expected_sig $expected_sig)
void verify_signed_public_session_data ($signed_data $signed_data, [string $public_key = null])
Variables
mixed $api_client (line 46)
  • access: public
mixed $api_key (line 47)
  • access: public
mixed $base_domain (line 56)
  • access: protected
mixed $canvas_user (line 55)
  • access: public
mixed $fb_params (line 52)
  • access: public
mixed $generate_session_secret (line 49)
  • access: public
mixed $profile_user (line 54)
  • access: public
mixed $secret (line 48)
  • access: public
mixed $session_expires (line 50)
  • access: public
mixed $user (line 53)
  • access: public
Methods
static method current_url (line 305)
  • access: public
static void current_url ()
static method generate_sig (line 546)
  • access: public
static void generate_sig ( $params_array,  $secret)
  • $params_array
  • $secret
static method get_facebook_url (line 324)
  • access: public
static void get_facebook_url ([ $subdomain = 'www'])
  • $subdomain
static method no_magic_quotes (line 413)

Tries to undo the badness of magic quotes as best we can

  • return: val without added slashes
  • access: public
static string no_magic_quotes (string $val)
  • string $val: Should come directly from $_GET, $_POST, etc.
Constructor __construct (line 71)
  • access: public
Facebook __construct ( $api_key,  $secret, [ $generate_session_secret = false])
  • $api_key
  • $secret
  • $generate_session_secret
clear_cookie_state (line 256)

Clears any persistent state stored about the user, including cookies and information related to the current session in the client.

  • access: public
void clear_cookie_state ()
create_templatizedFeedStory (line 583)
  • access: public
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
do_get_session (line 211)
  • access: public
void do_get_session ( $auth_token)
  • $auth_token
encode_feedStory (line 575)
  • access: public
void encode_feedStory ( $feed,  $next)
  • $feed
  • $next
encode_multiFeedStory (line 567)
  • access: public
void encode_multiFeedStory ( $feed,  $next)
  • $feed
  • $next
encode_validationError (line 560)
  • access: public
void encode_validationError ( $summary,  $message)
  • $summary
  • $message
expire_session (line 225)
  • access: public
void expire_session ()
get_add_url (line 333)
  • access: public
void get_add_url ([ $next = null])
  • $next
get_canvas_user (line 297)
  • access: public
void get_canvas_user ()
get_install_url (line 328)
  • access: public
void get_install_url ([ $next = null])
  • $next
get_loggedin_user (line 293)
  • access: public
void get_loggedin_user ()
get_login_url (line 344)
  • access: public
void get_login_url ( $next,  $canvas)
  • $next
  • $canvas
get_logout_url (line 359)
  • access: public
void get_logout_url ( $next)
  • $next
get_profile_user (line 301)
  • access: public
void get_profile_user ()
get_valid_fb_params (line 446)
  • access: public
void get_valid_fb_params ( $params, [ $timeout = null], [ $namespace = 'fb_sig'])
  • $params
  • $timeout
  • $namespace
in_fb_canvas (line 289)
  • access: public
void in_fb_canvas ()
in_frame (line 285)
  • access: public
void in_frame ()
logout (line 241)

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.

  • access: public
void logout (string $next)
  • string $next: URL to redirect to upon logging out
promote_session (line 195)
  • access: public
void promote_session ()
redirect (line 272)
  • access: public
void redirect ( $url)
  • $url
require_frame (line 318)
  • access: public
void require_frame ()
require_login (line 311)
  • access: public
void require_login ()
set_cookies (line 382)
  • access: public
void set_cookies ( $user,  $session_key, [ $expires = null], [ $session_secret = null])
  • $user
  • $session_key
  • $expires
  • $session_secret
set_user (line 372)
  • access: public
void set_user ( $user,  $session_key, [ $expires = null], [ $session_secret = null])
  • $user
  • $session_key
  • $expires
  • $session_secret
validate_fb_params (line 117)
  • access: public
void validate_fb_params ([ $resolve_auth_token = true])
  • $resolve_auth_token
verify_account_reclamation (line 485)

Validates the account that a user was trying to set up an independent account through Facebook Connect.

  • return: True if the user is the one that selected the reclamation link.
  • access: public
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.
verify_signature (line 497)

Validates that a given set of parameters match their signature.

Parameters all match a given input prefix, such as "fb_sig".

  • access: public
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
verify_signed_public_session_data (line 511)

Validate the given signed public session data structure with public key of the app that the session proof belongs to.

  • access: public
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

Documentation generated on Sun, 02 Jan 2011 23:14:12 +0000 by phpDocumentor 1.4.3