facebook/facebook-php-sdk-v4 — pull request #90 by SammyK (2014-05-27 20:49:06+00:00)
Title: Http client implementations for stream wrapper & Guzzle with stream fallback

Added implementations for stream wrapper & Guzzle. If curl isn't installed the default implementation will be the stream wrapper. Guzzle was added as a dev dependency under `require-dev` to the `composer.json` for testing. I also moved all the HTTP client stuff under the `HttpClients` folder to keep the files from getting out of hand.

To implement the stream wrapper:

```php
use Facebook\FacebookRequest;
use Facebook\HttpClients\FacebookStreamHttpClient;
FacebookRequest::setHttpClientHandler(new FacebookStreamHttpClient());
```

To implement Guzzle, update composer to require the Guzzle package:

```json
"require": {
"guzzlehttp/guzzle": "4.0.*"
}
```

Then:

```php
use Facebook\FacebookRequest;
use Facebook\HttpClients\FacebookGuzzleHttpClient;
FacebookRequest::setHttpClientHandler(new FacebookGuzzleHttpClient());
```

And the default implementation will be curl but you can force it like so:

```php
use Facebook\FacebookRequest;
use Facebook\HttpClients\FacebookCurlHttpClient;
FacebookRequest::setHttpClientHandler(new FacebookCurlHttpClient());
```