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

Class: Services_Facebook

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

Class Overview


Services_Facebook


Author(s):

Version:

  • Release: 0.1.2

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 36]
Services_Facebook


[ Top ]


Class Variables

$apiKey =  ''

[line 44]

Facebok application API key
  • Var: 32 character api_key from Facebook
  • 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 76]

Available drivers
  • Access: protected

Type:   array


[ Top ]

$instances = array()

[line 69]

Instances of various drivers
  • Access: protected

Type:   array


[ Top ]

$secret =  ''

[line 55]

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

Currently logged in user
  • Access: public

Type:   string


[ Top ]



Method Detail

factory   [line 105]

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

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 ]

__get   [line 126]

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 Mon, 11 Mar 2019 15:24:49 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.