dimanche 1 mars 2015

Facebook, Send request in PHP, I need some explanation

I have a problem for sending a request to other friend...


I'm making a simple game, I would like to send something to other friends.... I use this script:



$request = new FacebookRequest( $session, 'POST', '/me/apprequests', array (
'message' => 'hey! take this',
'data' => 'value of coin',
'to' => $IDofmyfriend,
)
);
$response = $request->execute();
$graphObject = $response->getGraphObject();


this will "works", but the reuquest will not send to my friends, but to me! I can read the request with my login by:



$request = new FacebookRequest(
$session,
'GET',
'/me/apprequests'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();


but my friend, will not see anything....


I use the test users...


maybe I'm missing something? why the request will not send? but I can see in my profile?


and how send a request to my friend? Sending request to myself doesn't make sense...


thank you very much :)


Aucun commentaire:

Enregistrer un commentaire