title: Facebook API real-time friends' online presence update
body: <p>I'm currently developing an app in facebook which has a list of my friends and shows their online presence. To get this, I used:</p>
  
  <pre><code>$fql = "SELECT uid, name, online_presence, status FROM user WHERE uid IN ( SELECT uid2 FROM friend WHERE uid1 = '".$this-&gt;user_id."')";
  $active = $this-&gt;facebook-&gt;api(array(
    'method' =&gt; 'fql.query',
    'query' =&gt;$fql
  ));
  </code></pre>
  
  <p>But since I'm only getting this information (status, online presence) at the time when I open my app, it'll not change until I reload my app.</p>
  
  <p>My question is, how can I get a real-time update of status-change or online-presence change by my friends?</p>
  
  <p>Please help. Thanks.</p>