Im tring to do the simple example of the documentation and i always get the error : Graph returned an error: Invalid appsecret_proof provided in the API argument
$appsecret_proof= hash_hmac('sha256', $access_token, $app_secret);
Where I can pass the appsecret_proof ?
require_once __DIR__ . '/vendor/autoload.php'; // change path as needed
$fb = new \Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.10',
//'default_access_token' => '{access-token}', // optional
]);
try {
$response = $fb->get('/me', '{access-token}');
} catch(\Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(\Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$me = $response->getGraphUser();
echo 'Logged in as ' . $me->getName();
Hello,
Im tring to do the simple example of the documentation and i always get the error : Graph returned an error: Invalid appsecret_proof provided in the API argument
$appsecret_proof= hash_hmac('sha256', $access_token, $app_secret);
Where I can pass the appsecret_proof ?