|
| __construct (array $config=[]) |
|
| getApp () |
|
| getClient () |
|
| getOAuth2Client () |
|
| getLastResponse () |
|
| getUrlDetectionHandler () |
|
| getDefaultAccessToken () |
|
| setDefaultAccessToken ($accessToken) |
|
| getDefaultGraphVersion () |
|
| getRedirectLoginHelper () |
|
| getJavaScriptHelper () |
|
| getCanvasHelper () |
|
| getPageTabHelper () |
|
| get ($endpoint, $accessToken=null, $eTag=null, $graphVersion=null) |
|
| post ($endpoint, array $params=[], $accessToken=null, $eTag=null, $graphVersion=null) |
|
| delete ($endpoint, array $params=[], $accessToken=null, $eTag=null, $graphVersion=null) |
|
| next (GraphEdge $graphEdge) |
|
| previous (GraphEdge $graphEdge) |
|
| getPaginationResults (GraphEdge $graphEdge, $direction) |
|
| sendRequest ($method, $endpoint, array $params=[], $accessToken=null, $eTag=null, $graphVersion=null) |
|
| sendBatchRequest (array $requests, $accessToken=null, $graphVersion=null) |
|
| newBatchRequest ($accessToken=null, $graphVersion=null) |
|
| request ($method, $endpoint, array $params=[], $accessToken=null, $eTag=null, $graphVersion=null) |
|
| fileToUpload ($pathToFile) |
|
| videoToUpload ($pathToFile) |
|
| uploadVideo ($target, $pathToFile, $metadata=[], $accessToken=null, $maxTransferTries=5, $graphVersion=null) |
|
Definition at line 51 of file Facebook.php.
◆ __construct()
Facebook\Facebook::__construct |
( |
array |
$config = [] | ) |
|
◆ delete()
Facebook\Facebook::delete |
( |
|
$endpoint, |
|
|
array |
$params = [] , |
|
|
|
$accessToken = null , |
|
|
|
$eTag = null , |
|
|
|
$graphVersion = null |
|
) |
| |
Sends a DELETE request to Graph and returns the result.
- Parameters
-
string | $endpoint | |
array | $params | |
AccessToken | string | null | $accessToken | |
string | null | $eTag | |
string | null | $graphVersion | |
- Returns
- FacebookResponse
- Exceptions
-
Definition at line 383 of file Facebook.php.
◆ fileToUpload()
Facebook\Facebook::fileToUpload |
( |
|
$pathToFile | ) |
|
Factory to create FacebookFile's.
- Parameters
-
- Returns
- FacebookFile
- Exceptions
-
Definition at line 557 of file Facebook.php.
◆ get()
Facebook\Facebook::get |
( |
|
$endpoint, |
|
|
|
$accessToken = null , |
|
|
|
$eTag = null , |
|
|
|
$graphVersion = null |
|
) |
| |
Sends a GET request to Graph and returns the result.
- Parameters
-
string | $endpoint | |
AccessToken | string | null | $accessToken | |
string | null | $eTag | |
string | null | $graphVersion | |
- Returns
- FacebookResponse
- Exceptions
-
Definition at line 333 of file Facebook.php.
◆ getApp()
Facebook\Facebook::getApp |
( |
| ) |
|
◆ getCanvasHelper()
Facebook\Facebook::getCanvasHelper |
( |
| ) |
|
Returns the canvas helper.
- Returns
- FacebookCanvasHelper
Definition at line 306 of file Facebook.php.
◆ getClient()
Facebook\Facebook::getClient |
( |
| ) |
|
◆ getDefaultAccessToken()
Facebook\Facebook::getDefaultAccessToken |
( |
| ) |
|
Returns the default AccessToken entity.
- Returns
- AccessToken|null
Definition at line 237 of file Facebook.php.
◆ getDefaultGraphVersion()
Facebook\Facebook::getDefaultGraphVersion |
( |
| ) |
|
Returns the default Graph version.
- Returns
- string
Definition at line 271 of file Facebook.php.
◆ getJavaScriptHelper()
Facebook\Facebook::getJavaScriptHelper |
( |
| ) |
|
Returns the JavaScript helper.
- Returns
- FacebookJavaScriptHelper
Definition at line 296 of file Facebook.php.
◆ getLastResponse()
Facebook\Facebook::getLastResponse |
( |
| ) |
|
Returns the last response returned from Graph.
- Returns
- FacebookResponse|FacebookBatchResponse|null
Definition at line 207 of file Facebook.php.
◆ getOAuth2Client()
Facebook\Facebook::getOAuth2Client |
( |
| ) |
|
Returns the OAuth 2.0 client service.
- Returns
- OAuth2Client
Definition at line 191 of file Facebook.php.
◆ getPageTabHelper()
Facebook\Facebook::getPageTabHelper |
( |
| ) |
|
Returns the page tab helper.
- Returns
- FacebookPageTabHelper
Definition at line 316 of file Facebook.php.
◆ getPaginationResults()
Facebook\Facebook::getPaginationResults |
( |
GraphEdge |
$graphEdge, |
|
|
|
$direction |
|
) |
| |
Sends a request to Graph for the next page of results.
- Parameters
-
GraphEdge | $graphEdge | The GraphEdge to paginate over. |
string | $direction | The direction of the pagination: next|previous. |
- Returns
- GraphEdge|null
- Exceptions
-
Definition at line 433 of file Facebook.php.
◆ getRedirectLoginHelper()
Facebook\Facebook::getRedirectLoginHelper |
( |
| ) |
|
Returns the redirect login helper.
- Returns
- FacebookRedirectLoginHelper
Definition at line 281 of file Facebook.php.
◆ getUrlDetectionHandler()
Facebook\Facebook::getUrlDetectionHandler |
( |
| ) |
|
Returns the URL detection handler.
- Returns
- UrlDetectionInterface
Definition at line 217 of file Facebook.php.
◆ newBatchRequest()
Facebook\Facebook::newBatchRequest |
( |
|
$accessToken = null , |
|
|
|
$graphVersion = null |
|
) |
| |
Instantiates an empty FacebookBatchRequest entity.
- Parameters
-
AccessToken | string | null | $accessToken | The top-level access token. Requests with no access token will fallback to this. |
string | null | $graphVersion | The Graph API version to use. |
- Returns
- FacebookBatchRequest
Definition at line 505 of file Facebook.php.
◆ next()
Facebook\Facebook::next |
( |
GraphEdge |
$graphEdge | ) |
|
Sends a request to Graph for the next page of results.
- Parameters
-
GraphEdge | $graphEdge | The GraphEdge to paginate over. |
- Returns
- GraphEdge|null
- Exceptions
-
Definition at line 404 of file Facebook.php.
◆ post()
Facebook\Facebook::post |
( |
|
$endpoint, |
|
|
array |
$params = [] , |
|
|
|
$accessToken = null , |
|
|
|
$eTag = null , |
|
|
|
$graphVersion = null |
|
) |
| |
Sends a POST request to Graph and returns the result.
- Parameters
-
string | $endpoint | |
array | $params | |
AccessToken | string | null | $accessToken | |
string | null | $eTag | |
string | null | $graphVersion | |
- Returns
- FacebookResponse
- Exceptions
-
Definition at line 358 of file Facebook.php.
◆ previous()
Facebook\Facebook::previous |
( |
GraphEdge |
$graphEdge | ) |
|
Sends a request to Graph for the previous page of results.
- Parameters
-
GraphEdge | $graphEdge | The GraphEdge to paginate over. |
- Returns
- GraphEdge|null
- Exceptions
-
Definition at line 418 of file Facebook.php.
◆ request()
Facebook\Facebook::request |
( |
|
$method, |
|
|
|
$endpoint, |
|
|
array |
$params = [] , |
|
|
|
$accessToken = null , |
|
|
|
$eTag = null , |
|
|
|
$graphVersion = null |
|
) |
| |
Instantiates a new FacebookRequest entity.
- Parameters
-
string | $method | |
string | $endpoint | |
array | $params | |
AccessToken | string | null | $accessToken | |
string | null | $eTag | |
string | null | $graphVersion | |
- Returns
- FacebookRequest
- Exceptions
-
Definition at line 532 of file Facebook.php.
◆ sendBatchRequest()
Facebook\Facebook::sendBatchRequest |
( |
array |
$requests, |
|
|
|
$accessToken = null , |
|
|
|
$graphVersion = null |
|
) |
| |
Sends a batched request to Graph and returns the result.
- Parameters
-
array | $requests | |
AccessToken | string | null | $accessToken | |
string | null | $graphVersion | |
- Returns
- FacebookBatchResponse
- Exceptions
-
Definition at line 483 of file Facebook.php.
◆ sendRequest()
Facebook\Facebook::sendRequest |
( |
|
$method, |
|
|
|
$endpoint, |
|
|
array |
$params = [] , |
|
|
|
$accessToken = null , |
|
|
|
$eTag = null , |
|
|
|
$graphVersion = null |
|
) |
| |
Sends a request to Graph and returns the result.
- Parameters
-
string | $method | |
string | $endpoint | |
array | $params | |
AccessToken | string | null | $accessToken | |
string | null | $eTag | |
string | null | $graphVersion | |
- Returns
- FacebookResponse
- Exceptions
-
Definition at line 463 of file Facebook.php.
◆ setDefaultAccessToken()
Facebook\Facebook::setDefaultAccessToken |
( |
|
$accessToken | ) |
|
Sets the default access token to use with requests.
- Parameters
-
AccessToken | string | $accessToken | The access token to save. |
- Exceptions
-
Definition at line 249 of file Facebook.php.
◆ uploadVideo()
Facebook\Facebook::uploadVideo |
( |
|
$target, |
|
|
|
$pathToFile, |
|
|
|
$metadata = [] , |
|
|
|
$accessToken = null , |
|
|
|
$maxTransferTries = 5 , |
|
|
|
$graphVersion = null |
|
) |
| |
Upload a video in chunks.
- Parameters
-
int | $target | The id of the target node before the /videos edge. |
string | $pathToFile | The full path to the file. |
array | $metadata | The metadata associated with the video file. |
string | null | $accessToken | The access token. |
int | $maxTransferTries | The max times to retry a failed upload chunk. |
string | null | $graphVersion | The Graph API version to use. |
- Returns
- array
- Exceptions
-
Definition at line 590 of file Facebook.php.
◆ videoToUpload()
Facebook\Facebook::videoToUpload |
( |
|
$pathToFile | ) |
|
Factory to create FacebookVideo's.
- Parameters
-
- Returns
- FacebookVideo
- Exceptions
-
Definition at line 571 of file Facebook.php.
◆ $app
◆ $client
Facebook\Facebook::$client |
|
protected |
◆ $defaultAccessToken
Facebook\Facebook::$defaultAccessToken |
|
protected |
◆ $defaultGraphVersion
Facebook\Facebook::$defaultGraphVersion |
|
protected |
◆ $lastResponse
Facebook\Facebook::$lastResponse |
|
protected |
◆ $oAuth2Client
Facebook\Facebook::$oAuth2Client |
|
protected |
◆ $persistentDataHandler
Facebook\Facebook::$persistentDataHandler |
|
protected |
◆ $pseudoRandomStringGenerator
Facebook\Facebook::$pseudoRandomStringGenerator |
|
protected |
◆ $urlDetectionHandler
Facebook\Facebook::$urlDetectionHandler |
|
protected |
◆ APP_ID_ENV_NAME
const Facebook\Facebook::APP_ID_ENV_NAME = 'FACEBOOK_APP_ID' |
@const string The name of the environment variable that contains the app ID.
Definition at line 66 of file Facebook.php.
◆ APP_SECRET_ENV_NAME
const Facebook\Facebook::APP_SECRET_ENV_NAME = 'FACEBOOK_APP_SECRET' |
@const string The name of the environment variable that contains the app secret.
Definition at line 71 of file Facebook.php.
◆ DEFAULT_GRAPH_VERSION
const Facebook\Facebook::DEFAULT_GRAPH_VERSION = 'v2.10' |
@const string Default Graph API version for requests.
Definition at line 61 of file Facebook.php.
◆ VERSION
const Facebook\Facebook::VERSION = '5.6.2' |
The documentation for this class was generated from the following file: