title: Deleting a Facebook Post from a Page with $facebook->api
body: <p>I am having trouble deleting a facebook post from my web app. Now I know the <a href="https://developers.facebook.com/docs/reference/api/" rel="nofollow">Facebook documentation</a> and other SO posts say to do this:</p>
  
  <pre><code>You can delete objects in the graph by issuing HTTP DELETE requests to 
  the object URLs, i.e,
  
  DELETE https://graph.facebook.com/ID?access_token=... HTTP/1.1
  </code></pre>
  
  <p>But since Im such a noob, I dont fully understand the short explanation of deleting with an HTTP request. Since it did not work when I tried, I assume that simply redirecting to the formed url in the example above does not delete anything.  This means theres some new area of web development that I now have to understand... HTTP requests. </p>
  
  <p>How are these done in php? The <a href="http://us.php.net/manual/en/class.httprequest.php" rel="nofollow">php manual</a> isnt helping much either.</p>
  
  <hr>
  
  <h2>Additional Information:</h2>
  
  <p>I have tried many different variations of:</p>
  
  <pre><code>$facebook-&gt;api($post_url, 'DELETE', array('method'=&gt; 'delete') );
  </code></pre>
  
  <p>The URL I am passing is <code>'/post_id'</code>. The <code>post_id</code> is being captured at post creation and stored into the database. This id matched the <code>$_GET['story_fbid']</code> that can be found on any post permalink. Perhaps this is not the correct id? I am retrieving the id with the following:</p>
  
  <pre><code>//post to wall
  $postResult = $facebook-&gt;api($post_url, 'post', $msg_body );
  //capture the id of the post
  $this-&gt;fb_post_id = $postResult['id'];
  </code></pre>
  
  <p>When I run the code above, no errors are thrown. It is being touched because a diagnostic <code>echo</code> after it is running. </p>
  
  <p>These are the different combinations of strings I have passed to api with <code>$post_url</code>:</p>
  
  <pre><code>/postid                  api returns true, nothing is deleted from Facebook
  /userid_postid           api returns false, Error: (#100) Invalid parameter
  /postid_userid           api returns false, Error: (#1705) : Selected wall post for deletion does not exist
  /accesstoken_postid      api returns false, Error: (#803) Some of the aliases you requested do not exist 
  /postid_accestoken       api returns false, Error: (#803) Some of the aliases you requested do not exist
  </code></pre>