Class ConnectComponent

Description

Facebook.Connect Uses the Facebook Connect API to log in a user through the Auth Component.

The user MUST create a new field in their user model called 'facebook_id'

Located in /controllers/components/connect.php (line 14)

Object
   |
   --ConnectComponent
Variable Summary
mixed $createUser
mixed $errors
mixed $hasAccount
mixed $me
mixed $noAuth
mixed $uid
Method Summary
void initialize (Controller &$Controller, [settings $settings = array()])
void user ([field $field = null], mixed 1)
mixed __runCallback (string $callback, [mixed $passedIn = null])
boolean __syncFacebookUser ()
Variables
mixed $createUser = true (line 46)

createUser is true you want the component to attempt to create a CakePHP Auth user

account by introspection on the Auth component. If false, you can use $this->hasAccount as a reference to decide what to do with that user. (default true)

mixed $errors = array() (line 39)

Error log

mixed $hasAccount = false (line 29)

hasAccount is true if the connected Facebook user has an account in your application

mixed $me = null (line 24)

me is the Facebook user object for the connected Facebook user

mixed $noAuth = false (line 34)

No Auth, if set to true, syncFacebookUser will NOT be called

mixed $uid = null (line 19)

uid is the Facebook ID of the connected Facebook user, or null if not connected

Methods
initialize (line 56)

Initialize, load the api, decide if we're logged in

Sync the connected Facebook user with your application

  • access: public
void initialize (Controller &$Controller, [settings $settings = array()])
  • Controller &$Controller: object to attach to
  • settings $settings: for Connect
user (line 125)

Read the logged in user

void user ([field $field = null], mixed 1)
  • mixed 1: return
  • field $field: key to return (xpath without leading slash)
__runCallback (line 155)

Run the callback if it exists

  • return: result of the callback function
mixed __runCallback (string $callback, [mixed $passedIn = null])
  • string $callback: callback
  • mixed $passedIn: passed in variable (optional)
__syncFacebookUser (line 72)

Sync the connected Facebook user

  • return: true if successful, false otherwise
  • access: protected
boolean __syncFacebookUser ()

Documentation generated on Mon, 29 Nov 2010 23:20:58 -0500 by phpDocumentor 1.4.3