You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/examples/retrieve_user_profile.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
This example covers getting profile information for the current user and printing their name, using the Graph API and the Facebook SDK for PHP.
4
4
5
-
It assumes that you've already obtained an access token from one of the helpers found [here](/docs/php/sdk_reference#helpers).
5
+
It assumes that you've already obtained an access token from one of the helpers found [here](../reference.md).
6
6
7
-
For more information, see the documentation for [`Facebook\Facebook`](/docs/php/Facebook), [`Facebook\FacebookResponse`](/docs/php/FacebookResponse), [`Facebook\GraphNodes\GraphUser`](/docs/php/GraphNode#user-instance-methods), [`Facebook\Exceptions\FacebookSDKException`](/docs/php/FacebookSDKException) and [`Facebook\Exceptions\FacebookResponseException`](/docs/php/FacebookResponseException).
7
+
For more information, see the documentation for [`Facebook\Facebook`](../reference/Facebook.md), [`Facebook\FacebookResponse`](../reference/FacebookResponse.md), [`Facebook\GraphNodes\GraphUser`](../reference/GraphNode.md#graphuser-instance-methods), [`Facebook\Exceptions\FacebookSDKException`](../reference/FacebookSDKException.md) and [`Facebook\Exceptions\FacebookResponseException`](../reference/FacebookResponseException.md).
Copy file name to clipboardExpand all lines: docs/examples/upload_photo.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
This example covers uploading a photo to the current User's profile using the Graph API and the Facebook SDK for PHP.
4
4
5
-
It assumes that you've already acquired an access token using one of the helper classes found [here](/docs/php/sdk_reference#helpers). The access token must have the `publish_actions` permission for this to work.
5
+
It assumes that you've already acquired an access token using one of the helper classes found [here](../reference.md). The access token must have the `publish_actions` permission for this to work.
6
6
7
-
For more information, see the documentation for [`Facebook\Facebook`](/docs/php/Facebook), [`Facebook\FileUpload\FacebookFile`](/docs/php/FacebookFile), [`Facebook\FacebookResponse`](/docs/php/FacebookResponse), [`Facebook\GraphNodes\GraphNode`](/docs/php/GraphNode), [`Facebook\Exceptions\FacebookSDKException`](/docs/php/FacebookSDKException) and [`Facebook\Exceptions\FacebookResponseException`](/docs/php/FacebookResponseException).
7
+
For more information, see the documentation for [`Facebook\Facebook`](../reference/Facebook.md), [`Facebook\FileUpload\FacebookFile`](,,/reference/FacebookFile.md), [`Facebook\FacebookResponse`](../reference/FacebookResponse.md), [`Facebook\GraphNodes\GraphNode`](../reference/GraphNode.md), [`Facebook\Exceptions\FacebookSDKException`](../reference/FacebookSDKException.md) and [`Facebook\Exceptions\FacebookResponseException`](../reference/FacebookResponseException.md).
Copy file name to clipboardExpand all lines: docs/examples/upload_video.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This example covers uploading & posting a video to a user's timeline with the Fa
7
7
> content: "Before you upload, check out the [video publishing options & requirements](https://developers.facebook.com/docs/graph-api/reference/video#publishing) for the specific video endpoint you want to publish to.",
8
8
> type: 'warning',
9
9
10
-
The following example will upload a video in chunks using the [resumable upload](/docs/graph-api/video-uploads#resumable) feature added in Graph v2.3.
10
+
The following example will upload a video in chunks using the [resumable upload](https://developers.facebook.com/docs/graph-api/video-uploads#resumable) feature added in Graph v2.3.
11
11
12
12
```
13
13
$fb = new Facebook\Facebook([
@@ -36,7 +36,7 @@ try {
36
36
echo 'Video ID: ' . $response['video_id'];
37
37
```
38
38
39
-
See more about the [`uploadVideo()` method](/docs/php/Facebook#upload-video).
39
+
See more about the [`uploadVideo()` method](..reference/Facebook.md#uploadvideo).
40
40
41
41
For versions of Graph before v2.3, videos had to be uploaded in one request.
Copy file name to clipboardExpand all lines: docs/reference/Facebook.md
+22-22
Original file line number
Diff line number
Diff line change
@@ -66,10 +66,10 @@ The secret of your Facebook app (required).
66
66
The default fallback access token to use if one is not explicitly provided. The value can be of type `string` or `Facebook\AccessToken`. If any other value is provided an `InvalidArgumentException` will be thrown. Defaults to `null`.
67
67
68
68
### `enable_beta_mode`
69
-
Enable [beta mode](/docs/support/beta-tier/) so that request are made to the [https://graph.beta.facebook.com](https://graph.beta.facebook.com/) endpoint. Set to boolean `true` to enable or `false` to disable. Defaults to `false`.
69
+
Enable [beta mode](https://developers.facebook.com/docs/apps/beta-tier) so that request are made to the [https://graph.beta.facebook.com](https://graph.beta.facebook.com/) endpoint. Set to boolean `true` to enable or `false` to disable. Defaults to `false`.
70
70
71
71
### `default_graph_version`
72
-
Allows you to overwrite the default Graph version number set in `Facebook\Facebook::DEFAULT_GRAPH_VERSION`. Set this as a string as it would appear in the Graph url, e.g. `v2.8`. Defaults to the [latest version of Graph](/docs/apps/changelog).
72
+
Allows you to overwrite the default Graph version number set in `Facebook\Facebook::DEFAULT_GRAPH_VERSION`. Set this as a string as it would appear in the Graph url, e.g. `v2.8`. Defaults to the [latest version of Graph](https://developers.facebook.com/docs/apps/changelog).
73
73
74
74
### `http_client_handler`
75
75
Allows you to overwrite the default HTTP client.
@@ -78,7 +78,7 @@ By default, the SDK will try to use cURL as the HTTP client. If a cURL implement
78
78
79
79
If you wish to use Guzzle, you can set this value to `guzzle`, but it requires that you [install Guzzle](http://docs.guzzlephp.org/en/latest/) with composer.
80
80
81
-
If you wish to write your own HTTP client, you can code your HTTP client to the `[Facebook\HttpClients\FacebookHttpClientInterface](/docs/php/FacebookHttpClientInterface)` and set this value to an instance of your custom client.
81
+
If you wish to write your own HTTP client, you can code your HTTP client to the `Facebook\HttpClients\FacebookHttpClientInterface` and set this value to an instance of your custom client.
82
82
83
83
```
84
84
$fb = new Facebook([
@@ -93,7 +93,7 @@ Allows you to overwrite the default persistent data store.
93
93
94
94
By default, the SDK will try to use the native PHP session for the persistent data store. There is also an in-memory persistent data handler which is useful when running your script from the command line for example. You can force either implementation by setting this value to `session` or `memory`.
95
95
96
-
If you wish to write your own persistent data handler, you can code your persistent data handler to the `[Facebook\PersistentData\PersistentDataInterface](/docs/php/PersistentDataInterface)` and set the value of `persistent_data_handler` to an instance of your custom handler.
96
+
If you wish to write your own persistent data handler, you can code your persistent data handler to the [`Facebook\PersistentData\PersistentDataInterface`](PersistentDataInterface.md) and set the value of `persistent_data_handler` to an instance of your custom handler.
97
97
98
98
```
99
99
$fb = new Facebook([
@@ -106,7 +106,7 @@ If any other value is provided an `InvalidArgumentException` will be thrown.
106
106
### `url_detection_handler`
107
107
Allows you to overwrite the default URL detection logic.
108
108
109
-
The SDK will do its best to detect the proper current URL but this can sometimes get tricky if you have a very customized environment. You can write your own URL detection logic that implements the `[Facebook\Url\UrlDetectionInterface](/docs/php/UrlDetectionInterface)` and set the value of `url_detection_handler` to an instance of your custom URL detector.
109
+
The SDK will do its best to detect the proper current URL but this can sometimes get tricky if you have a very customized environment. You can write your own URL detection logic that implements the ['Facebook\Url\UrlDetectionInterface'](UrlDetectionInterface.md)` and set the value of `url_detection_handler` to an instance of your custom URL detector.
110
110
111
111
```
112
112
$fb = new Facebook([
@@ -129,7 +129,7 @@ $fb = new Facebook([
129
129
]);
130
130
```
131
131
132
-
You can write your own CSPRSG that implements the `[Facebook\PseudoRandomString\PseudoRandomStringGeneratorInterface](/docs/php/PseudoRandomStringGeneratorInterface)` and set the value of `pseudo_random_string_generator` to an instance of your custom generator.
132
+
You can write your own CSPRSG that implements the [`Facebook\PseudoRandomString\PseudoRandomStringGeneratorInterface`](PseudoRandomStringGeneratorInterface.md) and set the value of `pseudo_random_string_generator` to an instance of your custom generator.
133
133
134
134
```
135
135
$fb = new Facebook([
@@ -161,13 +161,13 @@ Returns the instance of `Facebook\FacebookApp` for the instantiated service.
161
161
```
162
162
public Facebook\FacebookClient getClient()
163
163
```
164
-
Returns the instance of [`Facebook\FacebookClient`](/docs/php/FacebookClient) for the instantiated service.
164
+
Returns the instance of [`Facebook\FacebookClient`](FacebookClient.md) for the instantiated service.
165
165
166
166
## getOAuth2Client()
167
167
```
168
168
public Facebook\Authentication\OAuth2Client getOAuth2Client()
169
169
```
170
-
Returns an instance of [`Facebook\Authentication\OAuth2Client`](/docs/php/OAuth2Client).
170
+
Returns an instance of `Facebook\Authentication\OAuth2Client`.
171
171
172
172
## getLastResponse()
173
173
```
@@ -179,19 +179,19 @@ Returns the last response received from the Graph API in the form of a `Facebook
179
179
```
180
180
public Facebook\Url\UrlDetectionInterface getUrlDetectionHandler()
181
181
```
182
-
Returns an instance of [`Facebook\Url\UrlDetectionInterface`](/docs/php/UrlDetectionInterface).
182
+
Returns an instance of [`Facebook\Url\UrlDetectionInterface`](UrlDetectionInterface.md).
183
183
184
184
## getDefaultAccessToken()
185
185
```
186
186
public Facebook\Authentication\AccessToken|null getDefaultAccessToken()
187
187
```
188
-
Returns the default fallback [`AccessToken`](/docs/php/AccessToken) entity that is being used with every request to Graph. This value can be set with the configuration option `default_access_token` or by using `setDefaultAccessToken()`.
188
+
Returns the default fallback [`AccessToken`](AccessToken.md) entity that is being used with every request to Graph. This value can be set with the configuration option `default_access_token` or by using `setDefaultAccessToken()`.
189
189
190
190
## setDefaultAccessToken()
191
191
```
192
192
public setDefaultAccessToken(string|Facebook\AccessToken $accessToken)
193
193
```
194
-
Sets the default fallback access token to be use with all requests sent to Graph. The access token can be a string or an instance of [`AccessToken`](/docs/php/AccessToken).
194
+
Sets the default fallback access token to be use with all requests sent to Graph. The access token can be a string or an instance of [`AccessToken`](AccessToken.md).
195
195
196
196
```
197
197
$fb->setDefaultAccessToken('{my-access-token}');
@@ -233,7 +233,7 @@ $fb->get('/me');
233
233
The access token (as a string or `AccessToken` entity) to use for the request. If none is provided, the SDK will assume the value from the `default_access_token` configuration option if it was set.
234
234
235
235
`$eTag`
236
-
[Graph supports eTags](/docs/reference/ads-api/etags-reference/). Set this to the eTag from a previous request to get a `304 Not Modified` response if the data has not changed.
236
+
[Graph supports eTags](https://developers.facebook.com/docs/marketing-api/etags). Set this to the eTag from a previous request to get a `304 Not Modified` response if the data has not changed.
237
237
238
238
`$graphVersion`
239
239
This will overwrite the Graph version that was set in the `default_graph_version` configuration option.
@@ -336,7 +336,7 @@ The `$accessToken` and `$graphVersion` arguments are the same as `get()` above.
336
336
`$requests`
337
337
An array of `Facebook\FacebookRequest` entities. This can be a numeric or associative array but every value of the array has to be an instance of `Facebook\FacebookRequest`.
338
338
339
-
If the requests are sent as an associative array, the key will be used as the `name` of the request so that it can be referenced by another request. See more on [batch request naming and using JSONPath](/docs/graph-api/making-multiple-requests/#operations).
339
+
If the requests are sent as an associative array, the key will be used as the `name` of the request so that it can be referenced by another request. See more on [batch request naming and using JSONPath](https://developers.facebook.com/docs/graph-api/making-multiple-requests).
[See a full batch example](/docs/php/howto/example_batch_request).
350
+
[See a full batch example](../examples/batch_request.md).
351
351
352
352
## getRedirectLoginHelper()
353
353
```
354
354
public Facebook\Helpers\FacebookRedirectLoginHelper getRedirectLoginHelper()
355
355
```
356
356
357
-
Returns a [`Facebook\Helpers\FacebookRedirectLoginHelper`](/docs/php/FacebookRedirectLoginHelper) which is used to generate a "Login with Facebook" link and obtain an access token from a redirect.
357
+
Returns a [`Facebook\Helpers\FacebookRedirectLoginHelper`](FacebookRedirectLoginHelper.md) which is used to generate a "Login with Facebook" link and obtain an access token from a redirect.
public Facebook\Helpers\FacebookJavaScriptHelper getJavaScriptHelper()
366
366
```
367
367
368
-
Returns a [`Facebook\Helpers\FacebookJavaScriptHelper`](/docs/php/FacebookJavaScriptHelper) which is used to access the signed request stored in the cookie set by the SDK for JavaScript.
368
+
Returns a [`Facebook\Helpers\FacebookJavaScriptHelper`](FacebookJavaScriptHelper.md) which is used to access the signed request stored in the cookie set by the SDK for JavaScript.
public Facebook\Helpers\FacebookCanvasHelper getCanvasHelper()
377
377
```
378
378
379
-
Returns a [`Facebook\Helpers\FacebookCanvasHelper`](/docs/php/FacebookCanvasHelper) which is used to access the signed request that is `POST`ed to canvas apps.
379
+
Returns a [`Facebook\Helpers\FacebookCanvasHelper`](FacebookCanvasHelper.md) which is used to access the signed request that is `POST`ed to canvas apps.
public Facebook\Helpers\FacebookPageTabHelper getPageTabHelper()
388
388
```
389
389
390
-
Returns a [`Facebook\Helpers\FacebookPageTabHelper`](/docs/php/FacebookPageTabHelper) which is used to access the signed request that is `POST`ed to canvas apps and provides a number of helper methods useful for apps living in a page tab context.
390
+
Returns a [`Facebook\Helpers\FacebookPageTabHelper`](FacebookPageTabHelper.md) which is used to access the signed request that is `POST`ed to canvas apps and provides a number of helper methods useful for apps living in a page tab context.
public Facebook\GraphNodes\GraphEdge|null next(Facebook\GraphNodes\GraphEdge $graphEdge)
399
399
```
400
400
401
-
Requests and returns the next page of results in a [`Facebook\GraphNodes\GraphEdge`](/docs/php/GraphEdge) collection. If the next page returns no results, `null` will be returned.
401
+
Requests and returns the next page of results in a [`Facebook\GraphNodes\GraphEdge`](GraphEdge.md) collection. If the next page returns no results, `null` will be returned.
402
402
403
403
```
404
404
// Iterate over 5 pages max
@@ -499,7 +499,7 @@ public array videoToUpload(
499
499
)
500
500
```
501
501
502
-
Functionality to [upload video files in chunks](/docs/graph-api/video-uploads#resumable) was added to the Graph API in v2.3. The `uploadVideo()` method provides an easy API to take advantage of this new feature.
502
+
Functionality to [upload video files in chunks](https://developers.facebook.com/docs/graph-api/video-uploads#resumable) was added to the Graph API in v2.3. The `uploadVideo()` method provides an easy API to take advantage of this new feature.
503
503
504
504
### Parameters
505
505
@@ -510,13 +510,13 @@ The ID or alias of the target node. This can be a user ID, page ID, event ID, gr
510
510
The absolute or relative path to the video file to upload.
511
511
512
512
`$metadata`
513
-
All the metadata associated with the [Video node](/docs/graph-api/reference/video/).
513
+
All the metadata associated with the [Video node](https://developers.facebook.com/docs/graph-api/reference/video).
514
514
515
515
`$accessToken`
516
516
The access token to use for this request. Falls back to the default access token if one exists.
517
517
518
518
`$maxTransferTries`
519
-
During the [transfer phase](/docs/graph-api/video-uploads#transfer) an upload can fail for a number of reasons. If the Graph API responds with an error that is resumable, the PHP SDK will retry uploading the chunk automatically. By default the PHP SDK will try to upload each chunk five times before throwing a `FacebookResponseException`.
519
+
During the [transfer phase](https://developers.facebook.com/docs/graph-api/video-uploads#transfer) an upload can fail for a number of reasons. If the Graph API responds with an error that is resumable, the PHP SDK will retry uploading the chunk automatically. By default the PHP SDK will try to upload each chunk five times before throwing a `FacebookResponseException`.
520
520
521
521
`$graphVersion`
522
522
The version of the Graph API to use. The resumable upload feature did not become available until Graph v2.3.
Copy file name to clipboardExpand all lines: docs/reference/FacebookBatchRequest.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,9 @@ $request = new FacebookBatchRequest(
17
17
);
18
18
```
19
19
20
-
The `$requests` array is an array of [`Facebook\FacebookRequest`'s](/docs/php/FacebookRequest) to be sent as a batch request.
20
+
The `$requests` array is an array of [`Facebook\FacebookRequest`'s](FacebookRequest.md) to be sent as a batch request.
21
21
22
-
The `FacebookBatchRequest` entity does not actually make any calls to the Graph API, but instead just represents a batch request that can be sent to the Graph API later. The batch request can be sent by using [`Facebook\Facebook::sendBatchRequest()`](/docs/php/Facebook#send-batch-request) or [`Facebook\FacebookClient::sendBatchRequest()`](/docs/php/FacebookClient#send-batch-request).
22
+
The `FacebookBatchRequest` entity does not actually make any calls to the Graph API, but instead just represents a batch request that can be sent to the Graph API later. The batch request can be sent by using [`Facebook\Facebook::sendBatchRequest()`](Facebook.md#sendbatchrequest) or [`Facebook\FacebookClient::sendBatchRequest()`](FacebookClient.md#sendbatchrequest.md).
Since the `Facebook\FacebookBatchRequest` is extended from the [`Facebook\FacebookRequest`](/docs/php/FacebookRequest) entity, all the methods are inherited.
59
+
Since the `Facebook\FacebookBatchRequest` is extended from the [`Facebook\FacebookRequest`](FacebookRequest.md) entity, all the methods are inherited.
60
60
61
61
### add()
62
62
```
@@ -65,15 +65,15 @@ public add(
65
65
string|null $name
66
66
)
67
67
```
68
-
Adds a request to be sent in the batch request. The `$request` can be a single [`Facebook\FacebookRequest`](/docs/php/FacebookRequest) or an array of `Facebook\FacebookRequest`'s.
68
+
Adds a request to be sent in the batch request. The `$request` can be a single [`Facebook\FacebookRequest`](FacebookRequest.md) or an array of `Facebook\FacebookRequest`'s.
69
69
70
70
The `$name` argument is optional and is used to identify the request in the batch.
71
71
72
72
### getRequests()
73
73
```
74
74
public array getRequests()
75
75
```
76
-
Returns the array of [`Facebook\FacebookRequest`'s](/docs/php/FacebookRequest) to be sent in the batch request.
76
+
Returns the array of [`Facebook\FacebookRequest`'s](FacebookRequest.md) to be sent in the batch request.
0 commit comments