title: FB.Data.query and where to find the Facebook database scheme?
body: <p>Hi we've implemented the following code</p>
  
  <p>INIT block (<strong>WORKS</strong>)</p>
  
  <pre><code>FB.init({
      appId: 'apiID',
      status: true, // check login status
      cookie: true, // enable cookies to allow the server to access the session
      oauth: true,  // enable OAuth 2.0
      xfbml: true,   // parse XFBML
      frictionlessRequests: true
  });
  </code></pre>
  
  <p>LOGIN block (<strong>WORKS</strong>)</p>
  
  <pre><code>FB.login(function(response) {
      if (response.authResponse) {
        console.log('User logged and fully authorize the app.');
  
      } else {
        console.log('User cancelled login or did not fully authorize.');
      }
    }, {scope: 'email,user_location,friends_location'});
  </code></pre>
  
  <p>DATA RETRIEVE block (<strong>DON'T WORK</strong>)</p>
  
  <pre><code>var friends = FB.Data.query('SELECT uid, name, location FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me() ORDER BY rand() LIMIT 15) AND has_added_app=0');
  
  FB.Data.waitOn([friends], function() {
    FB.Array.forEach(friends.value, function(row) {
        console.log(row);
    });
  });
  </code></pre>
  
  <p>The last problem does not occur for "SELECT uid, name FROM user ...". </p>
  
  <p>Does anyone get an idea of the DB scheme of the facebook's "user" and "friend" tables? Other tables which can be accessed by "FB.Data.query"?</p>
  
  <p>Thank you!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>CORRECT DATA RETRIEVE block (<strong>WORKs</strong>)</p>
  
  <pre><code>var friends = FB.Data.query('SELECT uid, name, hometown_location, current_location FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me() ORDER BY rand() LIMIT 15) AND has_added_app=0');
  
  FB.Data.waitOn([friends], function() {
    FB.Array.forEach(friends.value, function(row) {
        console.log(row);
    });
  });
  </code></pre>