Inheritance diagram for Facebook:
 Collaboration diagram for Facebook:Public Member Functions | |
| __construct ($config) | |
| setAppId ($appId) | |
| getAppId () | |
| setApiSecret ($apiSecret) | |
| getApiSecret () | |
| setCookieSupport ($cookieSupport) | |
| useCookieSupport () | |
| setBaseDomain ($domain) | |
| getBaseDomain () | |
| setSession ($session=null, $write_cookie=true) | |
| getSession () | |
| getUser () | |
| getLoginUrl ($params=array()) | |
| getLogoutUrl ($params=array()) | |
| getLoginStatusUrl ($params=array()) | |
| api () | |
Public Attributes | |
| const | VERSION = '2.0.3' | 
Static Public Attributes | |
| static | $CURL_OPTS | 
| static | $DOMAIN_MAP | 
Protected Member Functions | |
| _restserver ($params) | |
| _graph ($path, $method='GET', $params=array()) | |
| _oauthRequest ($url, $params) | |
| makeRequest ($url, $params, $ch=null) | |
| getSessionCookieName () | |
| setCookieFromSession ($session=null) | |
| validateSessionObject ($session) | |
| getApiUrl ($method) | |
| getUrl ($name, $path='', $params=array()) | |
| getCurrentUrl () | |
Static Protected Member Functions | |
| static | generateSignature ($params, $secret) | 
Protected Attributes | |
| $appId | |
| $apiSecret | |
| $session | |
| $sessionLoaded = false | |
| $cookieSupport = false | |
| $baseDomain = '' | |
Static Protected Attributes | |
| static | $DROP_QUERY_PARAMS | 
Provides access to the Facebook Platform.
Definition at line 77 of file facebook.php.
| Facebook.__construct | ( | $ | config | ) | 
Initialize a Facebook Application.
The configuration:
| Array | $config the application configuration | 
Definition at line 153 of file facebook.php.
| Facebook._graph | ( | $ | path, | |
| $ |  method = 'GET',  | 
        |||
| $ |  params = array() | |||
| ) |  [protected] | 
        
Invoke the Graph API.
| String | $path the path (required) | |
| String | $method the http method (default 'GET') | |
| Array | $params the query/post data | 
| FacebookApiException | 
Definition at line 439 of file facebook.php.
| Facebook._oauthRequest | ( | $ | url, | |
| $ | params | |||
| ) |  [protected] | 
        
Make a OAuth Request
| String | $path the path (required) | |
| Array | $params the query/post data | 
| FacebookApiException | 
Definition at line 470 of file facebook.php.
| Facebook._restserver | ( | $ | params | ) |  [protected] | 
        
Invoke the old restserver.php endpoint.
| Array | $params method call object | 
| FacebookApiException | 
Definition at line 413 of file facebook.php.
| Facebook.api | ( | ) | 
Make an API call.
| Array | $params the API call parameters | 
Definition at line 397 of file facebook.php.
| static Facebook.generateSignature | ( | $ | params, | |
| $ | secret | |||
| ) |  [static, protected] | 
        
Generate a signature for the given params and secret.
| Array | $params the parameters to sign | |
| String | $secret the secret to sign with | 
Definition at line 747 of file facebook.php.
| Facebook.getApiSecret | ( | ) | 
| Facebook.getApiUrl | ( | $ | method | ) |  [protected] | 
        
Build the URL for api given parameters.
| $method | String the method name. | 
Definition at line 612 of file facebook.php.
| Facebook.getAppId | ( | ) | 
| Facebook.getBaseDomain | ( | ) | 
Get the base domain for the Cookie.
Definition at line 236 of file facebook.php.
| Facebook.getCurrentUrl | ( | ) |  [protected] | 
        
Returns the Current URL, stripping it of known FB parameters that should not persist.
Definition at line 709 of file facebook.php.
| Facebook.getLoginStatusUrl | ( | $ |  params = array() | 
          ) | 
Get a login status URL to fetch the status from facebook.
The parameters:
| Array | $params provide custom parameters | 
Definition at line 377 of file facebook.php.
| Facebook.getLoginUrl | ( | $ |  params = array() | 
          ) | 
Get a Login URL for use with redirects. By default, full page redirect is assumed. If you are using the generated URL with a window.open() call in JavaScript, you can pass in display=popup as part of the $params.
The parameters:
| Array | $params provide custom parameters | 
Definition at line 326 of file facebook.php.
| Facebook.getLogoutUrl | ( | $ |  params = array() | 
          ) | 
Get a Logout URL suitable for use with redirects.
The parameters:
| Array | $params provide custom parameters | 
Definition at line 353 of file facebook.php.
| Facebook.getSession | ( | ) | 
Get the session object. This will automatically look for a signed session sent via the Cookie or Query Parameters if needed.
Definition at line 263 of file facebook.php.
| Facebook.getSessionCookieName | ( | ) |  [protected] | 
        
The name of the Cookie that contains the session.
Definition at line 520 of file facebook.php.
| Facebook.getUrl | ( | $ | name, | |
| $ |  path = '',  | 
        |||
| $ |  params = array() | |||
| ) |  [protected] | 
        
Build the URL for given domain alias, path and parameters.
| $name | String the name of the domain | |
| $path | String optional path (without a leading slash) | |
| $params | Array optional query parameters | 
Definition at line 689 of file facebook.php.
| Facebook.getUser | ( | ) | 
Get the UID from the session.
Definition at line 307 of file facebook.php.
| Facebook.makeRequest | ( | $ | url, | |
| $ | params, | |||
| $ |  ch = null | |||
| ) |  [protected] | 
        
Makes an HTTP request. This method can be overriden by subclasses if developers want to do fancier things or use something other than curl to make the request.
| String | $url the URL to make the request to | |
| Array | $params the parameters to use for the POST body | |
| CurlHandler | $ch optional initialized curl handle | 
Definition at line 501 of file facebook.php.
| Facebook.setApiSecret | ( | $ | apiSecret | ) | 
Set the API Secret.
| String | $appId the API Secret | 
Definition at line 188 of file facebook.php.
| Facebook.setAppId | ( | $ | appId | ) | 
Set the Application ID.
| String | $appId the API key | 
Definition at line 169 of file facebook.php.
| Facebook.setBaseDomain | ( | $ | domain | ) | 
Set the base domain for the Cookie.
| String | $domain the base domain | 
Definition at line 226 of file facebook.php.
| Facebook.setCookieFromSession | ( | $ |  session = null | 
          ) |  [protected] | 
        
Set a JS Cookie based on the _passed in_ session. It does not use the currently stored session -- you need to explicitly pass it in.
| Array | $session the session to use for setting the cookie | 
Definition at line 530 of file facebook.php.
| Facebook.setCookieSupport | ( | $ | cookieSupport | ) | 
Set the Cookie Support status.
| Boolean | $cookieSupport the Cookie Support status | 
Definition at line 207 of file facebook.php.
| Facebook.setSession | ( | $ |  session = null,  | 
        |
| $ |  write_cookie = true | |||
| ) | 
Set the Session.
| Array | $session the session | |
| Boolean | $write_cookie indicate if a cookie should be written. this value is ignored if cookie support has been disabled. | 
Definition at line 247 of file facebook.php.
| Facebook.useCookieSupport | ( | ) | 
Get the Cookie Support status.
Definition at line 217 of file facebook.php.
| Facebook.validateSessionObject | ( | $ | session | ) |  [protected] | 
        
Validates a session_version=3 style session object.
| Array | $session the session object | 
Definition at line 575 of file facebook.php.
Facebook.$apiSecret [protected] | 
        
The Application API Secret.
Definition at line 120 of file facebook.php.
Facebook.$appId [protected] | 
        
The Application ID.
Definition at line 115 of file facebook.php.
Facebook.$baseDomain = '' [protected] | 
        
Base domain for the Cookie.
Definition at line 140 of file facebook.php.
Facebook.$cookieSupport = false [protected] | 
        
Indicates if Cookie support should be enabled.
Definition at line 135 of file facebook.php.
Facebook.$CURL_OPTS [static] | 
        
 array(
    CURLOPT_CONNECTTIMEOUT => 10,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT        => 60,
    CURLOPT_USERAGENT      => 'facebook-php-2.0',
  )
Default options for curl.
Definition at line 87 of file facebook.php.
Facebook.$DOMAIN_MAP [static] | 
        
 array(
    'api'      => 'https://api.facebook.com/',
    'api_read' => 'https://api-read.facebook.com/',
    'graph'    => 'https://graph.facebook.com/',
    'www'      => 'https://www.facebook.com/',
  )
Maps aliases to Facebook domains.
Definition at line 105 of file facebook.php.
Facebook.$DROP_QUERY_PARAMS [static, protected] | 
        
 array(
    'session',
  )
List of query parameters that get automatically dropped when rebuilding the current URL.
Definition at line 98 of file facebook.php.
Facebook.$session [protected] | 
        
The active user session, if one is available.
Definition at line 125 of file facebook.php.
Facebook.$sessionLoaded = false [protected] | 
        
Indicates that we already loaded the session as best as we could.
Definition at line 130 of file facebook.php.
| const Facebook.VERSION = '2.0.3' | 
Version.
Definition at line 82 of file facebook.php.
 1.7.1