Facebook PHP SDK send apprequests -


i'm using facebook php sdk , i'm trying send apprequests.

this code :

    $fb = new facebook([       'app_id' => 'app_id',       'app_secret' => 'secret',       'default_graph_version' => 'v2.5',     ]);      $oauth2client = $fb->getoauth2client();     $longlivedaccesstoken = $oauth2client->getlonglivedaccesstoken($request->get('token'));      $fb->setdefaultaccesstoken($longlivedaccesstoken);      $request = $fb->request('post', '/me/apprequests',       array ('message' => 'this test message','to' => '10156388930270332'));       //10156388930270332 facebook id      // send request graph     try {       $response = $fb->getclient()->sendrequest($request);     } catch(facebook\exceptions\facebookresponseexception $e) {       // when graph returns error       echo 'graph returned error: ' . $e->getmessage();       exit;     } catch(facebook\exceptions\facebooksdkexception $e) {       // when validation fails or other local issues       echo 'facebook sdk returned error: ' . $e->getmessage();       exit;     } 

with code, have no error. if check $response, have statut 200 (ok), can see message, to parameter don't notification on account...

what missed ?


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -