title: Getting list of Facebook friends with latest API
body: <p>I'm using <a href="http://github.com/facebook/php-sdk/" rel="noreferrer">the most recent version of the Facebook SDK</a> (which lets to connect to something called the 'graph API' though I'm not sure). I've adapted Facebook's example code to let me connect to Facebook and that works... but I can't get a list of my friends.</p>
  
  <pre><code>$friends = $facebook-&gt;api('friends.get');
  </code></pre>
  
  <p>This produces the error message: "Fatal error: Uncaught OAuthException: (#803) Some of the aliases you requested do not exist: friends.get thrown in /mycode/facebook.php on line 543"</p>
  
  <p>No clue why that is or what that means. Can someone tell me the right syntax (for the latest Facebook API) to get a list of friends? (I tried "$friends = $facebook->api->friends_get();" and get a different error, "Fatal error: Call to a member function friends_get() on a non-object in /mycode/example.php on line 129".)</p>
  
  <p>I can confirm that BEFORE this point in my code, things are fine: I'm connected to Facebook with a valid session and I can get my info and dump it to the screen just... i.e. this code executes perfectly before the failed friends.get call:</p>
  
  <pre><code>$session = $facebook-&gt;getSession();
  if ($session) {
      $uid = $facebook-&gt;getUser();
      $me = $facebook-&gt;api('/me');
  }
  print_r($me);
  </code></pre>