facebook/facebook-php-sdk — pull request #17 by kolarski (2012-04-05 11:01:20+00:00)
Title: Adding support for the new error codes returned by Facebook. 

One of the new error formats that facebook returns is like this:

{
"error": {
"message": "Error validating access token: The session has been invalidated because the user has changed the password.",
"type": "OAuthException",
"code": 190
}
}

With Facebook PHP SDK you *can't* execute **$ex->getCode()** because looks for `error_code` field only. I kept the original field but added support for the new format.

Here https://developers.facebook.com/roadmap/ (Batch API Exception Format) you can find more information for the new format. It is implemented already for many Graph API endpoints.