JavaScript Facebook signed_request JavaScript decode

Decoding the Facebook signed_request parameter to obtain information about the logged in user.
FB.getLoginStatus(function(response) {
    if (response.status == 'connected') {
        var signedRequest = response.authResponse.signedRequest;
        var data = signedRequest.split('.')[1];
        data = JSON.parse(decode_base64(data));
        user_id = data.user_id;
    else {
Posted by
Snippet Viewed 5061 times.

Share your JavaScript code snippets:

  • Get some recognition & link back to your site.
Submit | Browse

Most Recent javascript snippets

Most Viewed

The FitDesk Under Desk Elliptical