2012-02-07 10 views

risposta

1

Sarò possibile con FQL multi-query?

è possibile quando la casella di posta elettronica appartiene a un utente autenticato app con le autorizzazioni appropriate assegnate.

3
var fbid = your_fbuid_here; 
    FB.api({ 
       method: 'fql.query', 
       query: 'SELECT thread_id, author_id, created_time FROM message WHERE thread_id IN (SELECT thread_id FROM thread WHERE folder_id = 0) AND author_id = ' + fbid + ' ORDER BY created_time ASC LIMIT 1' 
      }, function (threadresponse) { 
       FB.api({ 
        method: 'fql.query', 
        query: 'SELECT thread_id, body, author_id, created_time FROM message WHERE thread_id = ' + threadresponse[0].thread_id + ' ORDER BY created_time ASC' 
       }, function (inboxresponse) { 
         //do stuff here with results 
       }); 
      }); 

+1

prima query selezionare solo le discussioni creati con l'utente uid amico. Se il thread è stato creato dall'utente corrente, non ci saranno risultati. – vian

+0

hey, mi stavo chiedendo se c'è un nuovo modo migliore per questo? Questo restituisce solo i messaggi creati dall'amico. – Michelle

Problemi correlati