title: How to get the list of friends in facebook for logged in user using PHP?
body: <p>I am using the following code to get the list of friends for the given secret key , how to get the list of friends for logged in userid (irrespective of appid, and secret id). </p>
  
  <pre><code> &lt;?php
  
     $facebook = new Facebook(array(
         'appId' =&gt; 'appId',
         'secret' =&gt; 'secretKey',
         'cookie' =&gt; true,
             ));
  
      $app_id = "appId";
      $app_secret = "secretKey";
      $my_url = "myurl";
  
  
      try {
          $uid = $facebook-&gt;getUser();
          $me = $facebook-&gt;api('/me');
          $friends = $facebook-&gt;api('/me/friends');
        } catch (FacebookApiException $e) {
         error_log($e);
       }
      ?&gt;
  </code></pre>