Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit e49dd1e

Browse files
authored
Merge branch '5.x' into 5.5
2 parents 7300943 + 6d1eb5a commit e49dd1e

31 files changed

+81
-81
lines changed

CHANGELOG.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22

33
Starting with version 5, the Facebook PHP SDK follows [SemVer](http://semver.org/).
44

5-
65
## 5.x
76

87
Version 5 of the Facebook PHP SDK is a complete refactor of version 4. It comes loaded with lots of new features and a friendlier API.
98

9+
- 5.6.2 (2018-02-15)
10+
- Strip 'code' param (#913)
11+
- 5.6.1 (2017-08-16)
12+
- Fixed doc block syntax that interfered with Doctrine (#844)
13+
- 5.6.0 (2017-07-23)
14+
- Bump Graph API version to v2.10 (#829)
1015
- 5.5.0 (2017-04-20)
1116
- Added support for batch options (#713)
1217
- Bump Graph API version to v2.9.
@@ -81,12 +86,10 @@ Version 5 of the Facebook PHP SDK is a complete refactor of version 4. It comes
8186
- Added `ext-mbstring` to composer require
8287
- Added this CHANGELOG. Hi! :)
8388

84-
8589
## 4.1-dev
8690

8791
Since the Facebook PHP SDK didn't follow SemVer in version 4.x, the master branch was going to be released as 4.1. However, the SDK switched to SemVer in v5.0. So any references on the internet to version 4.1 can be assumed to be an alias to version `5.0.0`
8892

89-
9093
## 4.0.x
9194

9295
Version 4.0 of the Facebook PHP SDK did not follow [SemVer](http://semver.org/). The versioning format used was as follows: `4.MAJOR.(MINOR|PATCH)`. The `MINOR` and `PATCH` versions were squashed together.

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Code of Conduct
2+
3+
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated.

CONTRIBUTING.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@ Contributing
33

44
Contributions are **welcome** and will be fully **credited**.
55

6-
We accept contributions via Pull Requests on [Github](https://github.com/facebook/facebook-php-sdk-v4).
6+
We accept contributions via Pull Requests on [Github](https://github.com/facebook/php-graph-sdk/pull/new).
77

8+
The current stable major version is v5. The v6 is under active development.
9+
10+
This means any new feature MUST target v6 (`master` branch).
11+
12+
The v5 (`5.x` branch) is maintained only for bug fixes, node/edge updates or documentation improvements.
13+
14+
## Code of Conduct
15+
The code of conduct is described in [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md)
816

917
## Pull Requests
1018

@@ -29,14 +37,12 @@ We accept contributions via Pull Requests on [Github](https://github.com/faceboo
2937

3038
- **Ensure no coding standards violations** - Please [run PHP Code Sniffer](#running-php-code-sniffer) using the PSR-2 standard before submitting your pull request. A violation will cause the build to fail, so please make sure there are no violations. We can't accept a patch if the build fails.
3139

32-
3340
## Running Tests
3441

3542
``` bash
3643
$ ./vendor/bin/phpunit
3744
```
3845

39-
4046
## Running PHP Code Sniffer
4147

4248
You can install [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer) globally with composer.

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
# Facebook SDK for PHP (v5)
22

3-
[![Build Status](https://img.shields.io/travis/facebook/php-graph-sdk/5.5.svg)](https://travis-ci.org/facebook/php-graph-sdk)
4-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/facebook/facebook-php-sdk-v4/badges/quality-score.png?b=5.5)](https://scrutinizer-ci.com/g/facebook/facebook-php-sdk-v4/?branch=5.5)
5-
[![Latest Stable Version](http://img.shields.io/badge/Latest%20Stable-5.5.0-blue.svg)](https://packagist.org/packages/facebook/graph-sdk)
6-
3+
[![Build Status](https://img.shields.io/travis/facebook/php-graph-sdk/5.x.svg)](https://travis-ci.org/facebook/php-graph-sdk)
4+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/facebook/facebook-php-sdk-v4/badges/quality-score.png?b=5.x)](https://scrutinizer-ci.com/g/facebook/facebook-php-sdk-v4/?branch=5.x)
5+
[![Latest Stable Version](http://img.shields.io/badge/Latest%20Stable-5.6.2-blue.svg)](https://packagist.org/packages/facebook/graph-sdk)
76

87
This repository contains the open source PHP SDK that allows you to access the Facebook Platform from your PHP app.
98

10-
119
## Installation
1210

1311
The Facebook PHP SDK can be installed with [Composer](https://getcomposer.org/). Run this command:
@@ -16,24 +14,25 @@ The Facebook PHP SDK can be installed with [Composer](https://getcomposer.org/).
1614
composer require facebook/graph-sdk
1715
```
1816

19-
Please be aware, that there are issues when using the Facebook SDK together with [Guzzle](https://github.com/guzzle/guzzle) 6.x. php-graph-sdk v5.x only works with Guzzle 5.x out of the box. However, [there is a workaround to make it work with Guzzle 6.x](https://www.sammyk.me/how-to-inject-your-own-http-client-in-the-facebook-php-sdk-v5#writing-a-guzzle-6-http-client-implementation-from-scratch).
17+
Please be aware, that there are issues when using the Facebook SDK together with [Guzzle](https://github.com/guzzle/guzzle) 6.x. php-graph-sdk v5.x only works with Guzzle 5.x out of the box. However, [there is a workaround to make it work with Guzzle 6.x](https://www.sammyk.me/how-to-inject-your-own-http-client-in-the-facebook-php-sdk-v5#writing-a-guzzle-6-http-client-implementation-from-scratch).
2018

2119
## Upgrading to v5.x
2220

2321
Upgrading from v4.x? Facebook PHP SDK v5.x introduced breaking changes. Please [read the upgrade guide](https://www.sammyk.me/upgrading-the-facebook-php-sdk-from-v4-to-v5) before upgrading.
2422

25-
2623
## Usage
2724

2825
> **Note:** This version of the Facebook SDK for PHP requires PHP 5.4 or greater.
2926
3027
Simple GET example of a user's profile.
3128

3229
```php
30+
require_once __DIR__ . '/vendor/autoload.php'; // change path as needed
31+
3332
$fb = new \Facebook\Facebook([
3433
'app_id' => '{app-id}',
3534
'app_secret' => '{app-secret}',
36-
'default_graph_version' => 'v2.9',
35+
'default_graph_version' => 'v2.10',
3736
//'default_access_token' => '{access-token}', // optional
3837
]);
3938

@@ -63,7 +62,6 @@ echo 'Logged in as ' . $me->getName();
6362

6463
Complete documentation, installation instructions, and examples are available [here](docs/).
6564

66-
6765
## Tests
6866

6967
1. [Composer](https://getcomposer.org/) is a prerequisite for running the tests. Install composer globally, then run `composer install` to install required files.
@@ -80,17 +78,14 @@ By default the tests will send live HTTP requests to the Graph API. If you are w
8078
$ ./vendor/bin/phpunit --exclude-group integration
8179
```
8280

83-
8481
## Contributing
8582

8683
For us to accept contributions you will have to first have signed the [Contributor License Agreement](https://developers.facebook.com/opensource/cla). Please see [CONTRIBUTING](https://github.com/facebook/php-graph-sdk/blob/master/CONTRIBUTING.md) for details.
8784

88-
8985
## License
9086

9187
Please see the [license file](https://github.com/facebook/php-graph-sdk/blob/master/LICENSE) for more information.
9288

93-
9489
## Security Vulnerabilities
9590

9691
If you have found a security issue, please contact the maintainers directly at [me@sammyk.me](mailto:me@sammyk.me).

docs/examples/access_token_from_canvas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A signed request will be sent to your app via the HTTP POST method within the co
1010
$fb = new Facebook\Facebook([
1111
'app_id' => '{app-id}',
1212
'app_secret' => '{app-secret}',
13-
'default_graph_version' => 'v2.9',
13+
'default_graph_version' => 'v2.10',
1414
]);
1515

1616
$helper = $fb->getCanvasHelper();

docs/examples/access_token_from_javascript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ In order to have the JavaScript SDK set a cookie containing a signed request (wh
2929
FB.init({
3030
appId: 'your-app-id',
3131
cookie: true, // This is important, it's not enabled by default
32-
version: 'v2.9'
32+
version: 'v2.10'
3333
});
3434
};
3535
@@ -52,7 +52,7 @@ After the user successfully logs in, redirect the user (or make an AJAX request)
5252
$fb = new Facebook\Facebook([
5353
'app_id' => '{app-id}',
5454
'app_secret' => '{app-secret}',
55-
'default_graph_version' => 'v2.9',
55+
'default_graph_version' => 'v2.10',
5656
]);
5757

5858
$helper = $fb->getJavaScriptHelper();

docs/examples/access_token_from_page_tab.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Page tabs behave much like the app canvas. The PHP SDK provides a helper for pag
1010
$fb = new Facebook\Facebook([
1111
'app_id' => '{app-id}',
1212
'app_secret' => '{app-secret}',
13-
'default_graph_version' => 'v2.9',
13+
'default_graph_version' => 'v2.10',
1414
]);
1515

1616
$helper = $fb->getPageTabHelper();

docs/examples/batch_request.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The following example assumes we have the following permissions granted from the
1111
$fb = new Facebook\Facebook([
1212
'app_id' => '{app-id}',
1313
'app_secret' => '{app-secret}',
14-
'default_graph_version' => 'v2.9',
14+
'default_graph_version' => 'v2.10',
1515
]);
1616

1717
// 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
109109
$fb = new Facebook\Facebook([
110110
'app_id' => '{app-id}',
111111
'app_secret' => '{app-secret}',
112-
'default_graph_version' => 'v2.9',
112+
'default_graph_version' => 'v2.10',
113113
]);
114114

115115
// 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
176176
$fb = new Facebook\Facebook([
177177
'app_id' => '{app-id}',
178178
'app_secret' => '{app-secret}',
179-
'default_graph_version' => 'v2.9',
179+
'default_graph_version' => 'v2.10',
180180
]);
181181

182182
// 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
241241
$fb = new Facebook\Facebook([
242242
'app_id' => '{app-id}',
243243
'app_secret' => '{app-secret}',
244-
'default_graph_version' => 'v2.9',
244+
'default_graph_version' => 'v2.10',
245245
]);
246246

247247
$batch = [

docs/examples/batch_upload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The following example will upload two photos and one video.
1212
$fb = new Facebook\Facebook([
1313
'app_id' => '{app-id}',
1414
'app_secret' => '{app-secret}',
15-
'default_graph_version' => 'v2.9',
15+
'default_graph_version' => 'v2.10',
1616
]);
1717

1818
// Since all the requests will be sent on behalf of the same user,

docs/examples/facebook_login.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In this example, the PHP script that generates the login link is called `/login.
1414
$fb = new Facebook\Facebook([
1515
'app_id' => '{app-id}',
1616
'app_secret' => '{app-secret}',
17-
'default_graph_version' => 'v2.9',
17+
'default_graph_version' => 'v2.10',
1818
]);
1919

2020
$helper = $fb->getRedirectLoginHelper();
@@ -31,7 +31,7 @@ echo '<a href="' . $loginUrl . '">Log in with Facebook!</a>';
3131
$fb = new Facebook\Facebook([
3232
'app_id' => '{app-id}',
3333
'app_secret' => '{app-secret}',
34-
'default_graph_version' => 'v2.9',
34+
'default_graph_version' => 'v2.10',
3535
]);
3636

3737
$helper = $fb->getRedirectLoginHelper();

0 commit comments

Comments
 (0)