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

Class: Services_Facebook

Source Location: /Services_Facebook-0.2.14/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',
        'stream'        => 'Stream',
        'users'         => 'Users'
    )

[line 116]

Available drivers
  • Access: protected

Type:   array


[ Top ]

$instance =

[line 109]

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

Type:   Services_Facebook


[ Top ]

$instances = array()

[line 101]

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

Currently logged in user
  • Access: public

Type:   string


[ Top ]

$timeout =  30

[line 87]

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 ]

$useDnsCache =  0

[line 77]

Use curl CURLOPT_DNS_USE_GLOBAL_CACHE option
  • Var: int switch to use the curl dns cache option
  • Access: public

Type:   bool


[ Top ]

$useSessionSecret =  false

[line 70]

Use secret as session secret
  • Var: Use session secret or not
  • Access: protected

Type:   bool


[ Top ]



Method Detail

factory   [line 146]

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

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

Services_Facebook singleton( )

Singleton
  • Access: public

[ Top ]

useSessionSecret   [line 255]

bool useSessionSecret( [bool $use = true])

Turn on using secret for session secret
  • Return: Using or not using
  • Access: public

Parameters:

bool   $use   —  Use secret for session secret or not

[ Top ]

__get   [line 184]

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:36:58 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.