\Horde_Service_Facebook_Request_Rest

Horde_Service_Facebook_Request:: encapsulate a request to the Facebook API.

Copyright 2009-2017 Horde LLC (http://www.horde.org/)

Summary

Methods
Properties
Constants
__construct()
run()
upload()
No public properties found
No constants found
_postRequest()
_finalizeParams()
_addStandardParams()
_convertToCsv()
_createPostString()
$_facebook
$_http
$_method
$_params
N/A
No private methods found
No private properties found
N/A

Properties

$_http

$_http : \Horde_Http_Client

Type

\Horde_Http_Client

$_method

$_method : string

The current method being processed.

Type

string

$_params

$_params : array

The method parameters for the current method call.

Type

array

Methods

__construct()

__construct(\Horde_Service_Facebook  $facebook, string  $method, array  $params = array()) 

Const'r

Parameters

\Horde_Service_Facebook $facebook
string $method
array $params

run()

run() : array

Run this request and return the data.

Throws

\Horde_Service_Facebook_Exception

Returns

array —

The results of the request.

upload()

upload(array  $options = array()) 

Perform a multipart/form-data upload.

Parameters

array $options

An options array:

  • params: (array) Form parameters to pass
  • file: (string) Local path to the file

_postRequest()

_postRequest(string  $method, array  $params) : string

Send a POST request

Parameters

string $method

The method to call.

array $params

The method parameters.

Throws

\Horde_Service_Facebook_Exception

Returns

string —

The request results

_finalizeParams()

_finalizeParams(array  $params) : void

Finalize, sanity check, standardze and sign the method parameters, $params

Parameters

array $params

Method parameters

_addStandardParams()

_addStandardParams(array  $params) : void

Adds standard facebook api parameters to $params

Parameters

array $params

Method parameters

_convertToCsv()

_convertToCsv(array  $params) : string

Helper function to convert array to CSV string

Parameters

array $params

Returns

string

_createPostString()

_createPostString(array  $params) : string

Create a string suitable for sending as POST data.

TODO: Figure out why using http_build_query doesn't work here.

Parameters

array $params

The parameters array

Returns

string —

The POST string