title: Trouble retrieving friends data from Facebook API
body: <p>I am trying to:</p>
  
  <p>Retrieve a friend list from a user with the friend information:</p>
  
  <ul>
  <li>Location</li>
  <li>Education</li>
  <li>Name</li>
  <li>Profile picture</li>
  </ul>
  
  <p>The problem is the standard permissions given only has friend profile picture and name. I used this to get the other information:</p>
  
  <pre><code>$params = array(
      'scope' =&gt; 'email, friends_likes, user_about_me, friends_about_me, friends_location, friends_website, friends_work_history, friends_education_history'
  );
  
  $loginUrl = $facebook-&gt;getLoginUrl($params);
  
  }
  </code></pre>
  
  <p>So now when I log in on my page, Facebook asks me if I'm willing to give those permissions to the application, so that is a good sign.</p>
  
  <p>The problem is I'm still not able to figure out how to get the information. When I try and do</p>
  
  <pre><code>print_r($friends);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>print_r($friends["data");
  </code></pre>
  
  <p>I still just get an array with name and ID.</p>
  
  <p>Why am I not seeing the extra information?</p>
  
  <p>This is not the full code, but a lot of it (most came from the example.php from the main Facebook GitHub account):</p>
  
  <pre><code>&lt;?php
      if ($user):
          echo "Name: " . $user_profile['name']; ?&gt; &lt;br /&gt;
      &lt;?php echo "Location: " . $user_profile['location']['name']; ?&gt; &lt;br /&gt;
      &lt;?php echo "Bio: " . $user_profile['bio']; ?&gt; &lt;br /&gt;
  
      &lt;?php
          foreach($user_profile['work'] as $work) {
              echo "Work: " . $work['employer']['name'];?&gt;&lt;br /&gt;
      &lt;?php   echo "Position: " . $work['position']['name'];?&gt;&lt;br /&gt;
      &lt;?php
          }
      ?&gt;
  
      &lt;img src="https://graph.facebook.com/&lt;?php echo $user; ?&gt;/picture?type=large"&gt;
  
      &lt;h3&gt;Your User Object (/me)&lt;/h3&gt;
      &lt;pre&gt;&lt;?php
      print_r($friends);
      ?&gt;&lt;/pre&gt;
  
      &lt;?php
          echo '&lt;ul&gt;';
          foreach ($friends["data"] as $value) {
              echo '&lt;li&gt;';
  
              echo '&lt;div class="pic"&gt;';
              echo '&lt;img src="https://graph.facebook.com/' . $value["id"] . '/picture?type=large"/&gt;';
              echo '&lt;/div&gt;';
              echo '&lt;div class="picName"&gt;'.$value["name"].'&lt;/div&gt;';
              echo '&lt;div class="location"&gt;'.$value["location"]["name"];
              echo '&lt;div class="bio"&gt;'.$value["bio"];
  
              echo '&lt;/div&gt;';
              echo '&lt;/li&gt;';
          }
          echo '&lt;/ul&gt;';
      ?&gt;
  </code></pre>
  
  <p>The API call (note I made the $permissions just for testing to be sure I was getting it, and they are showing up).</p>
  
  <pre><code>if ($user) {
      try {
          // Proceed knowing you have a logged in user who's authenticated.
          $user_profile = $facebook-&gt;api('/me');
          $permissions = $facebook-&gt;api('/me/permissions');
          $friends = $facebook-&gt;api('/me/friends');
      }
      catch (FacebookApiException $e) {
          error_log($e);
          $user = null;
      }
  }
  </code></pre>