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

Class: Services_Facebook_Common

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

Class Overview


Common class for all Facebook interfaces


Author(s):

Version:

  • Release: 0.1.2

Variables

Methods


Child classes:

Services_Facebook_FBML
Facebook FBML Interface
Services_Facebook_Application
Facebook Application Interface
Services_Facebook_Connect
Facebook Application Interface
Services_Facebook_Feed
Facebook Feed Interface
Services_Facebook_Notifications
Facebook Notifications 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 33]
Common class for all Facebook interfaces


[ Top ]


Class Variables

$api =  'http://api.facebook.com/restserver.php'

[line 40]

URI of Facebook's REST API
  • Access: protected

Type:   string


[ Top ]

$sessionKey =  ''

[line 54]

Currently logged in user
  • Access: public

Type:   string


[ Top ]

$version =  '1.0'

[line 47]

Version of the API to use
  • Access: protected

Type:   string


[ Top ]



Method Detail

checkRequest   [line 150]

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

void getApi( )

getApi
  • Access: public

[ Top ]

sendRequest   [line 76]

object Response sendRequest( string $method, [array $args = array()])

Send a request to the API

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: as an instance of SimleXmlElement
  • Throws: Services_Facebook_Exception
  • Access: protected

Parameters:

string   $method   —  The API method to call
array   $args   —  API arguments passed as GET args

[ Top ]

setApi   [line 200]

void setApi( mixed $api)

setApi
  • Access: public

Parameters:

mixed   $api   — 

[ Top ]

signRequest   [line 125]

array signRequest( array $args)

Sign the request

Parameters:

array   $args   —  Arguments for the request to be signed

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:24:49 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.