Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Simple GET example of a user's profile.
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
//'default_access_token' => '{access-token}', // optional
]);

Expand Down
8 changes: 4 additions & 4 deletions docs/Facebook.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To instantiate a new `Facebook\Facebook` service, pass an array of configuration
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
// . . .
]);
~~~~
Expand Down Expand Up @@ -53,7 +53,7 @@ $fb = new Facebook\Facebook([
'app_secret' => '{app-secret}',
'default_access_token' => '{access-token}',
'enable_beta_mode' => true,
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
'http_client_handler' => 'guzzle',
'persistent_data_handler' => 'memory',
'url_detection_handler' => new MyUrlDetectionHandler(),
Expand All @@ -74,7 +74,7 @@ The default fallback access token to use if one is not explicitly provided. The
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`.

### `default_graph_version` {#defaultversion}
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.5`. Defaults to the [latest version of Graph](/docs/apps/changelog).
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.6`. Defaults to the [latest version of Graph](/docs/apps/changelog).

### `http_client_handler` {#httpclient}
Allows you to overwrite the default HTTP client.
Expand Down Expand Up @@ -326,7 +326,7 @@ public Facebook\FacebookResponse sendRequest(
Sends a request to the Graph API.

~~~~
$response = $fb->sendRequest('GET', '/me', [], '{access-token}', 'eTag', 'v2.5');
$response = $fb->sendRequest('GET', '/me', [], '{access-token}', 'eTag', 'v2.6');
~~~~

## sendBatchRequest() {#send-batch-request}
Expand Down
2 changes: 1 addition & 1 deletion docs/FacebookRequest.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,6 @@ $fb = new Facebook\Facebook(/* . . . */);
$request = $fb->request('GET', '/me', ['fields' => 'id,name']);

$url = $request->getUrl();
// /v2.5/me?fields=id,name&access_token=token&appsecret_proof=proof
// /v2.6/me?fields=id,name&access_token=token&appsecret_proof=proof
~~~~
</card>
2 changes: 1 addition & 1 deletion docs/example_access_token_from_canvas.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A signed request will be sent to your app via the HTTP POST method within the co
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);

$helper = $fb->getCanvasHelper();
Expand Down
4 changes: 2 additions & 2 deletions docs/example_access_token_from_javascript.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ In order to have the JavaScript SDK set a cookie containing a signed request (wh
FB.init({
appId: 'your-app-id',
cookie: true, // This is important, it's not enabled by default
version: 'v2.5'
version: 'v2.6'
});
};

Expand All @@ -55,7 +55,7 @@ After the user successfully logs in, redirect the user (or make an AJAX request)
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);

$helper = $fb->getJavaScriptHelper();
Expand Down
2 changes: 1 addition & 1 deletion docs/example_access_token_from_page_tab.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Page tabs behave much like the app canvas. The PHP SDK provides a helper for pag
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);

$helper = $fb->getPageTabHelper();
Expand Down
4 changes: 2 additions & 2 deletions docs/example_batch_request.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The following example assumes we have the following permissions granted from the
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);

// Since all the requests will be sent on behalf of the same user,
Expand Down Expand Up @@ -114,7 +114,7 @@ Since the requests sent in a batch are unrelated by default, we can make request
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);

$batch = [
Expand Down
2 changes: 1 addition & 1 deletion docs/example_batch_upload.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The following example will upload two photos and one video.
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);

// Since all the requests will be sent on behalf of the same user,
Expand Down
4 changes: 2 additions & 2 deletions docs/example_facebook_login.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In this example, the PHP script that generates the login link is called `/login.
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);

$helper = $fb->getRedirectLoginHelper();
Expand All @@ -38,7 +38,7 @@ echo '<a href="' . $loginUrl . '">Log in with Facebook!</a>';
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);

$helper = $fb->getRedirectLoginHelper();
Expand Down
2 changes: 1 addition & 1 deletion docs/example_pagination_basic.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ In this example we'll pull five entries from a user's feed (assuming the user ap
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);

try {
Expand Down
2 changes: 1 addition & 1 deletion docs/example_post_links.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For more information, see the documentation for [`Facebook\Facebook`](/docs/php/
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);

$linkData = [
Expand Down
2 changes: 1 addition & 1 deletion docs/example_retrieve_user_profile.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For more information, see the documentation for [`Facebook\Facebook`](/docs/php/
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);

try {
Expand Down
2 changes: 1 addition & 1 deletion docs/example_upload_photo.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For more information, see the documentation for [`Facebook\Facebook`](/docs/php/
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);

$data = [
Expand Down
2 changes: 1 addition & 1 deletion docs/example_upload_video.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The following example will upload a video in chunks using the [resumable upload]
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);

$data = [
Expand Down
2 changes: 1 addition & 1 deletion docs/sdk_getting_started.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Before we can send requests to the Graph API, we need to load our app configurat
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.5',
'default_graph_version' => 'v2.6',
]);
~~~

Expand Down
2 changes: 1 addition & 1 deletion src/Facebook/Facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Facebook
/**
* @const string Default Graph API version for requests.
*/
const DEFAULT_GRAPH_VERSION = 'v2.5';
const DEFAULT_GRAPH_VERSION = 'v2.6';

/**
* @const string The name of the environment variable that contains the app ID.
Expand Down