From aaee490423d428b115401f03792508e701c81ddc Mon Sep 17 00:00:00 2001 From: Sammy Kaye Powers Date: Thu, 20 Apr 2017 09:12:49 -0500 Subject: [PATCH] Bump Graph API version to v2.9 --- README.md | 2 +- docs/examples/access_token_from_canvas.md | 2 +- docs/examples/access_token_from_javascript.md | 4 ++-- docs/examples/access_token_from_page_tab.md | 2 +- docs/examples/batch_request.md | 8 ++++---- docs/examples/batch_upload.md | 2 +- docs/examples/facebook_login.md | 4 ++-- docs/examples/pagination_basic.md | 2 +- docs/examples/post_links.md | 2 +- docs/examples/retrieve_user_profile.md | 2 +- docs/examples/upload_photo.md | 2 +- docs/examples/upload_video.md | 2 +- docs/getting_started.md | 4 ++-- docs/reference/Facebook.md | 8 ++++---- docs/reference/FacebookRequest.md | 2 +- src/Facebook/Facebook.php | 2 +- 16 files changed, 25 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 53fe1b989..e770989f8 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,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.8', + 'default_graph_version' => 'v2.9', //'default_access_token' => '{access-token}', // optional ]); diff --git a/docs/examples/access_token_from_canvas.md b/docs/examples/access_token_from_canvas.md index 6429322e9..27b655cee 100644 --- a/docs/examples/access_token_from_canvas.md +++ b/docs/examples/access_token_from_canvas.md @@ -10,7 +10,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.8', + 'default_graph_version' => 'v2.9', ]); $helper = $fb->getCanvasHelper(); diff --git a/docs/examples/access_token_from_javascript.md b/docs/examples/access_token_from_javascript.md index f248cfffc..738c83956 100644 --- a/docs/examples/access_token_from_javascript.md +++ b/docs/examples/access_token_from_javascript.md @@ -29,7 +29,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.8' + version: 'v2.9' }); }; @@ -52,7 +52,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.8', + 'default_graph_version' => 'v2.9', ]); $helper = $fb->getJavaScriptHelper(); diff --git a/docs/examples/access_token_from_page_tab.md b/docs/examples/access_token_from_page_tab.md index 1bf4f6cd2..0d3936e6d 100644 --- a/docs/examples/access_token_from_page_tab.md +++ b/docs/examples/access_token_from_page_tab.md @@ -10,7 +10,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.8', + 'default_graph_version' => 'v2.9', ]); $helper = $fb->getPageTabHelper(); diff --git a/docs/examples/batch_request.md b/docs/examples/batch_request.md index 518e97d42..8e3987f18 100644 --- a/docs/examples/batch_request.md +++ b/docs/examples/batch_request.md @@ -11,7 +11,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.8', + 'default_graph_version' => 'v2.9', ]); // Since all the requests will be sent on behalf of the same user, @@ -109,7 +109,7 @@ The following example is a subset of the [first example](#example). We will only $fb = new Facebook\Facebook([ 'app_id' => '{app-id}', 'app_secret' => '{app-secret}', - 'default_graph_version' => 'v2.8', + 'default_graph_version' => 'v2.9', ]); // Since all the requests will be sent on behalf of the same user, @@ -176,7 +176,7 @@ Since we want the second request to be executed after the first one is completed $fb = new Facebook\Facebook([ 'app_id' => '{app-id}', 'app_secret' => '{app-secret}', - 'default_graph_version' => 'v2.8', + 'default_graph_version' => 'v2.9', ]); // Since all the requests will be sent on behalf of the same user, @@ -241,7 +241,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.8', + 'default_graph_version' => 'v2.9', ]); $batch = [ diff --git a/docs/examples/batch_upload.md b/docs/examples/batch_upload.md index 386e3da7e..29a641c4f 100644 --- a/docs/examples/batch_upload.md +++ b/docs/examples/batch_upload.md @@ -12,7 +12,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.8', + 'default_graph_version' => 'v2.9', ]); // Since all the requests will be sent on behalf of the same user, diff --git a/docs/examples/facebook_login.md b/docs/examples/facebook_login.md index 823c1ce03..86c373b3f 100644 --- a/docs/examples/facebook_login.md +++ b/docs/examples/facebook_login.md @@ -14,7 +14,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.8', + 'default_graph_version' => 'v2.9', ]); $helper = $fb->getRedirectLoginHelper(); @@ -31,7 +31,7 @@ echo 'Log in with Facebook!'; $fb = new Facebook\Facebook([ 'app_id' => '{app-id}', 'app_secret' => '{app-secret}', - 'default_graph_version' => 'v2.8', + 'default_graph_version' => 'v2.9', ]); $helper = $fb->getRedirectLoginHelper(); diff --git a/docs/examples/pagination_basic.md b/docs/examples/pagination_basic.md index 4390c653c..ecce8892e 100644 --- a/docs/examples/pagination_basic.md +++ b/docs/examples/pagination_basic.md @@ -12,7 +12,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.8', + 'default_graph_version' => 'v2.9', ]); try { diff --git a/docs/examples/post_links.md b/docs/examples/post_links.md index 0c866044b..30cf7eaa6 100644 --- a/docs/examples/post_links.md +++ b/docs/examples/post_links.md @@ -12,7 +12,7 @@ For more information, see the documentation for [`Facebook\Facebook`](../referen $fb = new Facebook\Facebook([ 'app_id' => '{app-id}', 'app_secret' => '{app-secret}', - 'default_graph_version' => 'v2.8', + 'default_graph_version' => 'v2.9', ]); $linkData = [ diff --git a/docs/examples/retrieve_user_profile.md b/docs/examples/retrieve_user_profile.md index 74619e0e2..5b6c79f21 100644 --- a/docs/examples/retrieve_user_profile.md +++ b/docs/examples/retrieve_user_profile.md @@ -12,7 +12,7 @@ For more information, see the documentation for [`Facebook\Facebook`](../referen $fb = new Facebook\Facebook([ 'app_id' => '{app-id}', 'app_secret' => '{app-secret}', - 'default_graph_version' => 'v2.8', + 'default_graph_version' => 'v2.9', ]); try { diff --git a/docs/examples/upload_photo.md b/docs/examples/upload_photo.md index 180f82f55..28dd585df 100644 --- a/docs/examples/upload_photo.md +++ b/docs/examples/upload_photo.md @@ -12,7 +12,7 @@ For more information, see the documentation for [`Facebook\Facebook`](../referen $fb = new Facebook\Facebook([ 'app_id' => '{app-id}', 'app_secret' => '{app-secret}', - 'default_graph_version' => 'v2.8', + 'default_graph_version' => 'v2.9', ]); $data = [ diff --git a/docs/examples/upload_video.md b/docs/examples/upload_video.md index 97592a9d8..8b68a6f58 100644 --- a/docs/examples/upload_video.md +++ b/docs/examples/upload_video.md @@ -12,7 +12,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.8', + 'default_graph_version' => 'v2.9', ]); $data = [ diff --git a/docs/getting_started.md b/docs/getting_started.md index 6f6303bf6..8a4804b3c 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -86,7 +86,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.8', + 'default_graph_version' => 'v2.9', ]); ``` @@ -206,7 +206,7 @@ if (isset($accessToken)) { } ``` -> **Warning:** Make sure you set the `{cookie:true}` option when you [initialize the SDK for JavaScript](https://developers.facebook.com/docs/javascript/reference/FB.init/v2.8). This will make the SDK for JavaScript set a cookie on your domain containing information about the user in the form of a signed request. +> **Warning:** Make sure you set the `{cookie:true}` option when you [initialize the SDK for JavaScript](https://developers.facebook.com/docs/javascript/reference/FB.init/v2.9). This will make the SDK for JavaScript set a cookie on your domain containing information about the user in the form of a signed request. ## Extending the access token diff --git a/docs/reference/Facebook.md b/docs/reference/Facebook.md index 848ccae02..bacb9c4a9 100644 --- a/docs/reference/Facebook.md +++ b/docs/reference/Facebook.md @@ -10,7 +10,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.8', + 'default_graph_version' => 'v2.9', // . . . ]); ``` @@ -48,7 +48,7 @@ $fb = new Facebook\Facebook([ 'app_secret' => '{app-secret}', 'default_access_token' => '{access-token}', 'enable_beta_mode' => true, - 'default_graph_version' => 'v2.8', + 'default_graph_version' => 'v2.9', 'http_client_handler' => 'guzzle', 'persistent_data_handler' => 'memory', 'url_detection_handler' => new MyUrlDetectionHandler(), @@ -69,7 +69,7 @@ The default fallback access token to use if one is not explicitly provided. The 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`. ### `default_graph_version` -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). +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.9`. Defaults to the [latest version of Graph](https://developers.facebook.com/docs/apps/changelog). ### `http_client_handler` Allows you to overwrite the default HTTP client. @@ -317,7 +317,7 @@ public Facebook\FacebookResponse sendRequest( Sends a request to the Graph API. ```php -$response = $fb->sendRequest('GET', '/me', [], '{access-token}', 'eTag', 'v2.8'); +$response = $fb->sendRequest('GET', '/me', [], '{access-token}', 'eTag', 'v2.9'); ``` ## sendBatchRequest() diff --git a/docs/reference/FacebookRequest.md b/docs/reference/FacebookRequest.md index dd8ba6d16..8d69e46b9 100644 --- a/docs/reference/FacebookRequest.md +++ b/docs/reference/FacebookRequest.md @@ -176,5 +176,5 @@ $fb = new Facebook\Facebook(/* . . . */); $request = $fb->request('GET', '/me', ['fields' => 'id,name']); $url = $request->getUrl(); -// /v2.8/me?fields=id,name&access_token=token&appsecret_proof=proof +// /v2.9/me?fields=id,name&access_token=token&appsecret_proof=proof ``` diff --git a/src/Facebook/Facebook.php b/src/Facebook/Facebook.php index ae7cd68a2..22cd41232 100644 --- a/src/Facebook/Facebook.php +++ b/src/Facebook/Facebook.php @@ -58,7 +58,7 @@ class Facebook /** * @const string Default Graph API version for requests. */ - const DEFAULT_GRAPH_VERSION = 'v2.8'; + const DEFAULT_GRAPH_VERSION = 'v2.9'; /** * @const string The name of the environment variable that contains the app ID.