title: Facebook Graph API - getting post ID without leading user ID
body: <p>I'm using the FB Graph API to get a user's posts and render a list in PHP. I'd like to include a link to each post, and I've been trying to generate those links by inserting the "post ID" number into a URL. However, the id returned by the graph API is a two-part number that appears to be in the format <code>userID_postID</code>. Is there a field that just contains the post ID without the leading user ID and underscore? The Graph API docs don't seem to be very clear on this.</p>
  
  <pre><code>&lt;?php 
    function fetchUrl($url){
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($ch, CURLOPT_TIMEOUT, 20);
  
      $feedData = curl_exec($ch);
      curl_close($ch); 
  
      return $feedData;
    } 
  
    $profile_id = "PROFILEIDHERE";
  
    $app_id = "APPIDHERE";
    $app_secret = "APPSECRETHERE";
  
    $authToken = fetchUrl("https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&amp;client_id={$app_id}&amp;client_secret={$app_secret}");
  
    $json_object = fetchUrl("https://graph.facebook.com/{$profile_id}/feed?{$authToken}&amp;limit=10");
  
    $feedarray = json_decode($json_object);
  
    foreach ( $feedarray-&gt;data as $feed_data )
    {
      echo $feed_data-&gt;id;
    }
  
  ?&gt;
  </code></pre>