title: Execute graph API Facebook [send app request]
body: <p>I want to send app request to user of app Facebook.</p>
  
  <p><code>https://graph.facebook.com/myid_facebook/apprequests?message=</code>test<code>&amp;data=</code>INSERT_STRING_DATA<code>&amp;access_token=XXXXXXX&amp;method=post</code></p>
  
  <p>I've tried using curl, but it's not to work ... </p>
  
  <p>This is my source code</p>
  
  <pre><code>$app_id = 'XXXXXXXXXX';
  $app_secret = 'XXXXXXXXXXXXXXX';
  
  $apprequest_url = "https://graph.facebook.com/endif.tc" .
          "/apprequests?message=’pak nurrohman memberi anda tugas’" .
          "&amp;data=’INSERT_STRING_DATA’&amp;access_token=" .
          $this-&gt;facebook-&gt;getAccessToken() . "&amp;method=post";
  
  $result = file_get_html($apprequest_url);
  echo ("Request id number: " . $result['request']);
  </code></pre>
  
  <p><strong>file_get_html</strong> is function to load another page using curl.</p>
  
  <p>and this error is:</p>
  
  <pre><code>"failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request"
  </code></pre>
  
  <p>I want to execute this graph on php side..is there any solution for me?</p>
  
  <p>I'm sorry, my bad english.:)</p>