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 6211 times.

Share your JavaScript code snippets:

  • Get some recognition & a link back to your site.
  • Create your own code library.
  • Help your fellow developers, as they have helped you.


Submit | Browse

Most Recent javascript snippets

Most Viewed