According to Facebook - Authentication within a Canvas Page Document, they say that we will be getting a signed_request
which consists a JSON object. Now they s
I think it failed at json_decode($json)
because $json
is not a valid json string, as you've mentioned in comment about print_r($_POST['signed_request']);
.
According to Facebook - Authentication within a Canvas Page Document, the signed_request
parameter is encoded and, parsing the signed_request
string will yield a JSON object.
if you're using the PHP SDK, just as Abhishek said in the comment, $facebook->getSignedRequest();
will give you the decoded json.
look here for more details on the Signed Request