title: How to get the locale or current location of the user in facebook iframe application?
body: <p>I am developing an iFrame application in facebook. What is the syntax to get the locale of an user? I am using the PHP client library.</p>
  
  <p>I had tried this piece of code:</p>
  
  <pre><code>&lt;?php
  
     $user_details = $facebook-&gt;api_client-&gt;users_getInfo($user_id, 'name,hometown_location');
     $locale = $user_details[0]['hometown_location']['city']; 
     echo "Location: ".$locale;
   ?&gt;
  </code></pre>
  
  <p>But I get the following error msg:</p>
  
  <pre><code> Fatal error: Cannot use string offset as an array in C:\xampplite\htdocs\FacebookApp\deals.php on line 51
  </code></pre>
  
  <p>Some one help me with this.</p>