Sorry, bit of a StackOverflow noob, but for anyone trying to use JohnK's method to decode, it works brilliantly, just a couple of implementation tips for anyone like me and the others with the base64 encoding issue....
The Json reference is also available from nuGet
Install-Package Newtonsoft.Json
http://developers.facebook.com/docs/guides/canvas/#auth explains the ["signed_request"] element in more detail, but put simply, when Facebook posts back (in my case after a user registration request), you can get the data from the post, but the string is in TWO PARTS, separated by a '.' - As such, trying to decode ["signed_request"] will fail as '.' isn't a Base64 char. The first part is the signature to allow you to validate that the post came from Facebook (only us and them know the sig to decode) and the second is the payload.
So, I got this to work with the following code (in a MVC controller), source is a Facebook registration button....
<fb:registration fields="name,email" redirect-uri="http://dev.devurlgoeshere.co.uk/Account/Register" width="530">
</fb:registration>
and then the Controller code responds to the registration request
[HttpPost]
public ActionResult Register(object postData )
{
string requestData = Request.Form["signed_request"];
string[] splitPayload = requestData.Split('.');
string sig = splitPayload[0];
string payload = splitPayload[1];
var decodedObj = DecodePayload(payload);
// get the items from the decodedObject
string userFacebookID = decodedObj["user_id"];
// now do what you want with their FacebookID
return View();
}
hope this helps someone, and sorry if this should have been edit/feedback or whatever...