facebook/facebook-php-sdk-v4 — pull request #177 by complex857 (2014-08-01 06:50:04+00:00)
Title: Fix "Fatal error: Cannot use object of type stdClass as array" errors

When an embed object returned which has no own GraphObject subclass the resulting GraphObject instance recieves an stdObject for backingData which is wrong since the getProperty method expects it to be an array.

Example:
```php
$me = (new FB\FacebookRequest(
$session, 'GET', '/me?fields=email,picture'
))->execute()->getGraphObject(FB\GraphUser::className());

$me->getProperty('picture')->getProperty('url');

// prints "false" this is clearly wrong, i asked for an array.
var_dump(is_array($me->getProperty('picture')->asArray()));

```php

The reason behind this error is this is in the [`__construct` of `GraphObject`](https://github.com/complex857/facebook-php-sdk-v4/blob/a417ea0ae61fad14abab6b81728b79e8a912a082/src/Facebook/GraphNodes/GraphObject.php#L53)
The code tries to detect if it got an `\stdObject` and do converts it if it's the top level data it received, but then goes to check for a `data` key and there is no conversion for that.

The proposed change make everything received from the grap api in json to be converted into arrays instead of `\stdObject` regardless of nesting so you I think you can delete the [explicit check and conversion](https://github.com/complex857/facebook-php-sdk-v4/blob/a417ea0ae61fad14abab6b81728b79e8a912a082/src/Facebook/GraphNodes/GraphObject.php#L47-L49) too in the `__construct` of `GraphObject`