Les Notifications de l'API du SDK PHP

Je suis en train d'envoyer une notification à un de mes utilisateurs (https://developers.facebook.com/docs/app_notifications/) mais je n'arrive pas à obtenir ce travail avec mon SDK PHP.

Je suis en utilisant ce code:

$data = array(
    'href'=> 'https://apps.facebook.com/MY_APP/',
    'access_token'=> $app_token,
    'template'=> 'test'
);
$sendnotification = $facebook->api('/USER_ID/notifications', 'post', $data);

Et c'est ce que l'erreur que j'obtiens en retour:

Fatal error: Uncaught OAuthException: Invalid jeton d'accès OAuth
la signature. jeté dans /usr/home/test/base_facebook.php sur la ligne de 1039

C'est la façon dont je m'app jeton d'accès:

$APPLICATION_ID = "MY_APP_ID";
$APPLICATION_SECRET = "MY_APP_SECRET";

$token_url =    "https://graph.facebook.com/oauth/access_token?" .
                "client_id=" . $APPLICATION_ID .
                "&client_secret=" . $APPLICATION_SECRET .
                "&grant_type=client_credentials";
$app_token = file_get_contents($token_url);

Ce que je fais mal?


Il y avait un problème avec access_token, si j'utilise un jeton d'accès directement dans sode, il fonctionne maintenant.

'access_token'=> 'K3Rds2y0cGm...',

Personne ne sait combien de temps app jeton d'accès dure?