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

Class: Services_Facebook_Common

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

Class Overview


Common class for all Facebook interfaces


Author(s):

Version:

  • Release: 0.2.14

Variables

Methods


Child classes:

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

$useSessionSecret =  false

[line 67]

Use secret as session secret or not
  • Access: public

Type:   bool


[ Top ]

$version =  '1.0'

[line 53]

Version of the API to use
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 76]

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 100]

mixed callMethod( mixed $method, [array $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 226]

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 263]

string getAPI( )

Get API
  • Return: API url
  • Access: public

[ Top ]

parseResponse   [line 150]

string parseResponse( mixed $response)

parseResponse

Parses the raw response from Facebook

  • Return: Parsed response
  • Access: protected

Parameters:

mixed   $response   —  Response xml

[ Top ]

sendRequest   [line 118]

object Response sendRequest( array $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 275]

void setAPI( mixed $api)

Set API
  • Access: public

Parameters:

mixed   $api   —  Api url to set

[ Top ]

signRequest   [line 197]

array signRequest( array $args)

Sign the request

Parameters:

array   $args   —  Arguments for the request to be signed

[ Top ]

updateArgs   [line 179]

void updateArgs( array &$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 Mon, 11 Mar 2019 15:36:58 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.