title: Request dialog - handling in PHP
body: <p>till now I was using code which is here below, unfortunately it doesn't work anymore. Can anybody help me please. I'm really beginner, so I would appreciate whole  code or just what and exactly I should change. How do I get ID request, ID user from and ID user to in php?
  Thank you very much  </p>
  
  <pre><code> &lt;script&gt;
        FB.init({
          appId  : '111111111111111',
          status : true,
          cookie : true,
          oauth: true
        });    
        function sendRequestViaMultiFriendSelector() {
          FB.ui({method: 'apprequests',
            message: 'My Great Request'
          }, requestCallback);
        }
  
        function requestCallback(response) {
        $.post("process_ids.php", {uid: &lt;?php echo $uid; ?&gt;, request_ids: String(response.request_ids) } ); 
        return false;
        }
      &lt;/script&gt;
  
  ///////////////////////process_ids.php :
  
  &lt;?php
      $appid  ='11111111111111';
      $secret ='22222222222222222';
  
  if(isset($_POST['request_ids']) &amp;&amp; !empty($_POST['request_ids'])){
  
  $app_token = file_get_contents('https://graph.facebook.com/oauth/access_token?client_id='.$appid.'&amp;client_secret='.$secret.'&amp;grant_type=client_credentials'); //Get application token
  
  $sent   = explode(',', $_POST['request_ids']);  //Convert csv to array
  $count = count($sent); //count how many objects in array    
  for ($a = 0; $a &lt; $count; $a++) {    
  $request = file_get_contents('https://graph.facebook.com/'.$sent[$a].'?'.$app_token);
  
  preg_match("/\"to\":\{\"name\":\"(.*?)\",\"id\":\"(.*?)\"/i", $request, $getInfo);
  
  $sent_to_name = $getInfo[1];
  $sent_to_id = $getInfo[2];
  
  preg_match("/\"id\":\"(.*?)\"/i", $request, $getInfo);
  $idrequest = $getInfo[1];
  
   $delete_url = "https://graph.facebook.com/" . $idrequest . "?" . $app_token . "&amp;method=delete";
  }
  } ?&gt;
  </code></pre>