title: Facebook Graph API: Get user location
body: <p>I'm trying to get facebook user location with this code but it's not working:</p>
  
  <pre><code>        $user_fbid  = $fbuser;
          $user_email = $user_profile["email"];
          $user_fnmae = $user_profile["first_name"];
          $user_lnmae = $user_profile["last_name"];
          $user_lcity = $user_profile["location"]['name'];
  </code></pre>
  
  <p>All the other fields work, but I can't get the current city/country of the user. Any idea where is the problem?</p>
  
  <p>I changed this:</p>
  
  <pre><code>        $user_lcity = $user_profile["location"]['name'];
  </code></pre>
  
  <p>to this:</p>
  
  <pre><code>        $user_lcity = $user_profile["location"];
  </code></pre>
  
  <p>But still nothing changes.</p>