Getting a signed request using javascript from facebook is different from the value in $ _REQUEST ['signed_request']
what you can do is save $ _REQUEST ['signed_request'] into a javascript variable and pass it through ajax to php.
eg
var signedRequest = <?php echo $_REQUEST['signed_request'] ?>
// then run the jsonp request.
you can use my service though if you want.
HOW TO USE: just run jsonp request on this
https://websta.me/fbappservice/parseSignedRequest/<append signed request here>
if success returns something like this
{ "algorithm": "HMAC-SHA256", "issued_at": xxxxx, "page": { "id": "xxxxxxx", "admin": true, "liked": false }, "user": { "country": "jp", "locale": "en_US", "age": { "min": xx } }
if it fails:
Bad signed Json Signature
happy coding !!
source share