Overview

Packages

  • None
  • Service
    • Facebook

Classes

  • Horde_Service_Facebook
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Service_Facebook

Facebook Platform PHP5 client

Copyright 2004-2009 Facebook. All Rights Reserved.

Copyright (c) 2007 Facebook, Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

For help with this library, contact developers-help@facebook.com

Located at Horde/Service/Facebook.php
Methods summary
public
# __construct( string $appId, string $secret, array $context )

Const'r

Const'r

Parameters

$appId
Application ID.
$secret
Developer API secret.
$context
Array of context information containing: <pre>http_client - required logger use_ssl</pre>
public mixed
# __get( string $value )

Lazy load the facebook classes.

Lazy load the facebook classes.

Parameters

$value
The lowercase representation of the subclass.

Returns

mixed

Throws

Horde_Service_Facebook_Exception
public static string
# getFacebookUrl( string $subdomain = 'www' )

Helper function to get the appropriate facebook url

Helper function to get the appropriate facebook url

Parameters

$subdomain
The subdomain to use (www).

Returns

string
public
# batchBegin( )

Start a batch operation.

Start a batch operation.

public
# batchEnd( )

End current batch operation

End current batch operation

public mixed &
# callMethod( string $method, array $params = array() )

Calls the specified normal POST method with the specified parameters.

Calls the specified normal POST method with the specified parameters.

Parameters

$method
Name of the Facebook method to invoke
$params
A map of param names => param values

Returns

mixed

Result of method call; this returns a reference to support 'delayed returns' when in a batch context. See: http://wiki.developers.facebook.com/index.php/Using_batching_API

public array
# callUploadMethod( string $method, array $params, string $file )

Calls the specified file-upload POST method with the specified parameters

Calls the specified file-upload POST method with the specified parameters

Parameters

$method
Name of the Facebook method to invoke
$params
A map of param names => param values
$file
A path to the file to upload (required)

Returns

array
A dictionary representing the response.
Constants summary
integer API_VALIDATION_ERROR
# 1
string REST_SERVER_ADDR
# 'https://api.facebook.com/method/'
string GRAPH_SERVER_ADDR
# 'https://graph.facebook.com'
string DATA_FORMAT_JSON

Data format returned to client code.

Data format returned to client code.

# 'json'
string DATA_FORMAT_XML
# 'xml'
string DATA_FORMAT_ARRAY
# 'array'
Properties summary
public boolean $useSslResources

Use only ssl resource flag

Use only ssl resource flag

# false
public Horde_Service_Facebook::DATA_FORMAT_* $dataFormat

Return format

Return format

# Horde_Service_Facebook::DATA_FORMAT_ARRAY
API documentation generated by ApiGen