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

Class: Services_Facebook

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

Class Overview


Services_Facebook


Author(s):

Version:

  • Release: @package_version@

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 36]
Services_Facebook


[ Top ]


Class Variables

$apiKey =  ''

[line 52]

Facebok application API key
  • Var: 32 character api_key from Facebook
  • Access: public

Type:   string


[ Top ]

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

[line 44]

Facebook API URL
  • Var: URL that that API calls will be sent to
  • Access: public

Type:   string


[ Top ]

$drivers = array(
        'admin'         => 'Admin',
        'application'   => 'Application',
        'auth'          => 'Auth',
        'connect'       => 'Connect',
        'data'          => 'Data',
        'events'        => 'Events',
        'fbml'          => 'FBML',
        'fql'           => 'FQL',
        'feed'          => 'Feed',
        'friends'       => 'Friends',
        'groups'        => 'Friends',
        'marketplace'   => 'MarketPlace',
        'notifications' => 'Notifications',
        'pages'         => 'Pages',
        'photos'        => 'Photos',
        'profile'       => 'Profile',
        'share'         => 'Share',
        'users'         => 'Users'
    )

[line 102]

Available drivers
  • Access: protected

Type:   array


[ Top ]

$instance =

[line 95]

Instance of Services_Facebook
  • See: Services_Facebook::singleton();
  • Access: protected

Type:   Services_Facebook


[ Top ]

$instances = array()

[line 87]

Instances of various drivers
  • Access: protected

Type:   array


[ Top ]

$secret =  ''

[line 63]

Facebok application secret

The Facebook secret token is used to both sign requests sent to Facebook and to verify requests sent from Facebook to your application.

  • Var: 32 character secret from Facebook
  • Access: public

Type:   string


[ Top ]

$sessionKey =  ''

[line 80]

Currently logged in user
  • Access: public

Type:   string


[ Top ]

$timeout =  30

[line 73]

Timeout

The amount in seconds for the curl http request timeout

  • Var: Time in seconds for a request to timeout
  • Access: public

Type:   string


[ Top ]



Method Detail

factory   [line 131]

object Instance factory( string $endPoint)

Create a facebook service
  • Return: of Facebook endpoint
  • Throws: Services_Facebook_Exception
  • Access: protected

Parameters:

string   $endPoint     Services to create

[ Top ]

isValidRequest   [line 205]

boolean isValidRequest( array $args)

Validates requests from Facebook

Facebook sends a series of $_POST variables when it requests a canvas page or sends a user to the post removal URL. This function validates that request came from Facebook. This function returns true if the request came from Facebook.

Both the signature of the request and the api_key is verified. If the api_key given doesn't match up to the current Services_Facebook::$apiKey then it will return false.

  • Return: True if the request signature is valid
  • Access: public

Parameters:

array   $args     Normally the $_POST array

[ Top ]

singleton   [line 149]

Services_Facebook singleton( )

Singleton
  • Access: public

[ Top ]

__get   [line 169]

object __get( string $driver)

Lazy loader for Facebook drivers
  • Throws: Services_Facebook_Exception
  • Access: public

Parameters:

string   $driver     The Facebook driver/endpoint to load

[ Top ]


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