title: Get latitude/longitude of friend's current_location using Graph FQL
body: <p>I'm trying to get the latitude/longitude of all of a user's friends using a single API call. I believe I need to write a multi-query FQL statement, but I can't get the syntax correct.</p>
  
  <p>I believe the two queries need to be something like the following:</p>
  
  <pre><code>'"friends":"SELECT uid,current_location FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())"'
  
  '"location":"SELECT location FROM page WHERE id IN (SELECT current_location_id FROM #friends)"';
  </code></pre>
  
  <p>My problem is that somehow I need to get the ID of the current_location in the first query so that I can reference it in the second query, but I only know how to get an array that contains the id.</p>
  
  <p>Thanks for any help!</p>
  
  <p><strong>Clarification:</strong></p>
  
  <p>I'm not trying to get check-ins of friends.  Instead I want to graph the "current_location" (i.e. where they live) of all of a user's friends on a Geo map.  I can get a user's "current_location" with the following FQL query:</p>
  
  <pre><code>"SELECT uid,sex,current_location FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())"
  </code></pre>
  
  <p>This query returns the following array:</p>
  
  <pre><code>[current_location] =&gt; Array
              (
                  [city] =&gt; New York
                  [state] =&gt; New York
                  [country] =&gt; United States
                  [zip] =&gt; 
                  [id] =&gt; 108424279189115
                  [name] =&gt; New York, New York
              )
  </code></pre>
  
  <p>Which does not contain the longitude and latitude of the of the current_location (New York in the above example)</p>
  
  <p>Therefore I now need to take the ID of the current_location (e.g. 108424279189115) and run a second FQL query such as:</p>
  
  <pre><code>"SELECT location,name FROM page WHERE page_id = 108424279189115)"
  </code></pre>
  
  <p>To get the latitude and longitude of the current_location.  Currently, I have a working code that runs the first FQL query, then extracts page_id in php, and then runs a second FQL query to get the current_location latitude/longitude.  However, for performance reasons I would like to run only one multi-query if this is possible.</p>