Services_Facebook
[ class tree: Services_Facebook ] [ index: Services_Facebook ] [ all elements ]

Class: Services_Facebook_Common

Source Location: /Services_Facebook-0.2.8/Services/Facebook/Common.php

Class Overview


Common class for all Facebook interfaces


Author(s):

Version:

  • Release: 0.2.8

Variables

Methods


Child classes:

Services_Facebook_Connect
Facebook Application Interface
Services_Facebook_Groups
Facebook Groups Interface
Services_Facebook_Application
Facebook Application Interface
Services_Facebook_Admin
Facebook Admin Interface
Services_Facebook_Auth
Facebook Authentication Interface
Services_Facebook_Events
Facebook Events Interface
Services_Facebook_Friends
Facebook Friends Interface
Services_Facebook_Batch
Facebook Batch Interface
Services_Facebook_Notifications
Facebook Notifications Interface
Services_Facebook_FQL
Facebook FQL (Facebook Query Language) Interface
Services_Facebook_Users
Facebook Users Interface
Services_Facebook_Profile
Facebook Profile Interface
Services_Facebook_Data
Common class for all Facebook interfaces
Services_Facebook_Photos
Facebook Notifications Interface
Services_Facebook_MarketPlace
Facebook Marketplace Interface
Services_Facebook_FBML
Facebook FBML Interface
Services_Facebook_Pages
Facebook Pages Interface
Services_Facebook_Feed
Facebook Feed Interface

Inherited Variables

Inherited Methods


Class Details

[line 39]
Common class for all Facebook interfaces


[ Top ]


Class Variables

$api =  ''

[line 46]

URI of Facebook's REST API
  • Access: protected

Type:   string


[ Top ]

$sessionKey =  ''

[line 60]

Currently logged in user
  • Access: public

Type:   string


[ Top ]

$version =  '1.0'

[line 53]

Version of the API to use
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 69]

void __construct( )

Construct

Construct. Set API URL, something that may change per driver.

  • Access: public

Overridden in child classes as:

Services_Facebook_Connect::__construct()
Construct

[ Top ]

callMethod   [line 93]

mixed callMethod( mixed $method, [ $args = array()])

Call method

Used by all of the interface classes to send a request to the Facebook API. It builds the standard argument list, munges that with the arguments passed to it, signs the request and sends it along to the API.

Once the request has taken place the cURL response is checked to make sure no low level HTTP errors occurred, the XML is parsed using SimpleXml and then checked for Facebook errors.

Any formal error encountered is thrown as an exception.

  • Return: Result
  • Access: public

Overridden in child classes as:

Services_Facebook_Data::callMethod()

Parameters:

mixed   $method     Method to call
array   $args     Arguments to send

[ Top ]

checkRequest   [line 214]

Array checkRequest( object $xml)

Check if request resulted in an error
  • Return: with code/message or false if no error is present
  • Access: protected

Parameters:

object   $xml     Instance of SimpleXmlElement

[ Top ]

getAPI   [line 251]

string getAPI( )

Get API
  • Return: API url
  • Access: public

[ Top ]

parseResponse   [line 142]

string parseResponse( mixed $response)

parseResponse

Parses the raw response from Facebook

  • Return: Parsed response
  • Access: protected

Parameters:

mixed   $response     Response xml

[ Top ]

sendRequest   [line 111]

object Response sendRequest( $args)

Send a request to the API
  • Return: as an instance of SimleXmlElement
  • Throws: Services_Facebook_Exception
  • Access: protected

Parameters:

array   $args     API arguments passed as GET args

[ Top ]

setAPI   [line 263]

void setAPI( mixed $api)

Set API
  • Access: public

Parameters:

mixed   $api     Api url to set

[ Top ]

signRequest   [line 189]

array signRequest( $args)

Sign the request

Parameters:

array   $args     Arguments for the request to be signed

[ Top ]

updateArgs   [line 171]

void updateArgs( &$args, mixed $method)

Update arguments

Updates the arguments with api_key, version, etc. Then signs it.

  • Access: protected

Parameters:

array   &$args     Arguments being sent
mixed   $method     Method being called

[ Top ]


Documentation generated on Fri, 05 Jun 2009 19:00:03 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.