facebook/facebook-php-sdk-v4 — pull request #114 by SammyK (2014-06-12 06:54:43+00:00)
Title: Decoupled signed request handling

This PR completely decouples all the signed request handling from `FacebookSession`, `FacebookCanvasLoginHelper`, `FacebookPageTabHelper`, and `FacebookJavaScriptLoginHelper`.

Now we can handle signed requests directly. For example, signed requests are `POST`ed to a callback that you can set in your app setting when a user deauthorizes your app. So with this refactor you can do this on that callback URL:

```php
use Facebook\Entities\SignedRequest;

$signedRequest = new SignedRequest($_POST['signed_request']);

$parsedSignedRequest = $signedRequest->getPayload();
$userId = $signedRequest->getUserId();
$someData = $signedRequest->get('some_other_data');
```

And if a `FacebookSession` was created from a signed request, you can access the entity like so:

```php
$signedRequest = $session->getSignedRequest();

$userId = $signedRequest->getUserId();
// . . .
```

1. The next step is to decouple access token handling with a `Facebook\Entities\AccessToken` entity.
2. Once this PR gets pulled in, I'm going to submit a PR that refactors the tests a bit. Check out the format of the method names in the tests that are included in this PR. It's way more readable and isolated. I want to do this throughout the test suite. I also want to properly handle creating and destroying the test user that is created when running the tests. Currently I have a ton of `PHPUnitTestUser`'s in my test app.