Public Member Functions | Protected Member Functions | Static Protected Attributes

Facebook Class Reference

Inheritance diagram for Facebook:
Collaboration diagram for Facebook:

List of all members.

Public Member Functions

 __construct ($config)

Protected Member Functions

 setPersistentData ($key, $value)
 getPersistentData ($key, $default=false)
 clearPersistentData ($key)
 clearAllPersistentData ()
 constructSessionVariableName ($key)

Static Protected Attributes

static $kSupportedKeys

Detailed Description

Copyright 2011 Facebook, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Extends the BaseFacebook class with the intent of using PHP sessions to store user ids and access tokens.

Definition at line 24 of file facebook.php.


Constructor & Destructor Documentation

Facebook.__construct ( config  ) 

Identical to the parent constructor, except that we start a PHP session to store the user ID and access token if during the course of execution we discover them.

Parameters:
Array $config the application configuration.
See also:
BaseFacebook.__construct in facebook.php

Reimplemented from BaseFacebook.

Definition at line 35 of file facebook.php.


Member Function Documentation

Facebook.clearAllPersistentData (  )  [protected]

Clear all data from the persistent storage

Returns:
void

Reimplemented from BaseFacebook.

Definition at line 82 of file facebook.php.

Facebook.clearPersistentData ( key  )  [protected]

Clear the data with $key from the persistent storage

Parameters:
string $key
Returns:
void

Reimplemented from BaseFacebook.

Definition at line 72 of file facebook.php.

Facebook.constructSessionVariableName ( key  )  [protected]

Definition at line 88 of file facebook.php.

Facebook.getPersistentData ( key,
default = false 
) [protected]

Get the data for $key, persisted by BaseFacebook.setPersistentData()

Parameters:
string $key The key of the data to retrieve
boolean $default The default value to return if $key is not found
Returns:
mixed

Reimplemented from BaseFacebook.

Definition at line 61 of file facebook.php.

Facebook.setPersistentData ( key,
value 
) [protected]

Provides the implementations of the inherited abstract methods. The implementation uses PHP sessions to maintain a store for authorization codes, user ids, CSRF states, and access tokens.

Reimplemented from BaseFacebook.

Definition at line 51 of file facebook.php.


Member Data Documentation

Facebook.$kSupportedKeys [static, protected]
Initial value:
    array('state', 'code', 'access_token', 'user_id')

Definition at line 42 of file facebook.php.


The documentation for this class was generated from the following file: