Skip to content

Commit

Permalink
Bump Graph API version to v2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
SammyK committed Apr 20, 2017
1 parent c0e6d82 commit aaee490
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
]);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/access_token_from_canvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/access_token_from_javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
});
};
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/access_token_from_page_tab.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/batch_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/batch_upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/facebook_login.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -31,7 +31,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.8',
'default_graph_version' => 'v2.9',
]);

$helper = $fb->getRedirectLoginHelper();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/pagination_basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/post_links.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/retrieve_user_profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/upload_photo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/upload_video.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]);
```

Expand Down Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions docs/reference/Facebook.md
Original file line number Diff line number Diff line change
Expand Up @@ -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',
// . . .
]);
```
Expand Down Expand Up @@ -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(),
Expand All @@ -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.
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/FacebookRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
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.8';
const DEFAULT_GRAPH_VERSION = 'v2.9';

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

0 comments on commit aaee490

Please sign in to comment.