heroku/faceplate — pull request #1 by pwagener (2012-05-26 20:38:00+00:00)
Title: Keep all of 'signed_request' data in the FaceplateSession

This makes some minor modifications to keep all of the decoded 'signed_request' as a part of the Faceplate session.

The 'signed_request' has useful info beyond just the access token. It is especially important when writing a Facebook App that can be installed as a Page Tab. For instance, I'd like to be able to easily see:
* The FB ID of the current user. Sure, I can get that and much more by calling `req.facebook.me(someCallback)`, but that may be an unnecessary round-trip call to Facebook.
* The details of the Page Tab that was accessed to enter the application. See 'Integrating with Facebook APIs' at the bottom of [this page](https://developers.facebook.com/docs/appsonfacebook/pagetabs/). As far as I know there isn't another way to get this info.
* The expiration date of the user's token. This can be retrieved in other ways, but again is unnecessary.

The modifications are backwards compatible as it still stores the access token as `req.facebook.token`. If users need the rest of the signed request info, it is available as `req.facebook.signed_req`. Note I haven't tested the parsing of the signed request from the cookie, but it is similar enough to the POST body scenario.

PS. Love the simplicity of this module. Great to see this compared to the 700 other over-designed FB API node wrappers.