2012-02-07 9 views

Respuesta

1

¿Seré posible con FQL multi-query?

es posible cuando la bandeja de entrada pertenece a un usuario autenticado aplicación con los permisos adecuados otorgados.

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

primera consulta seleccionarán solamente los hilos creados con el usuario UID de un amigo. Si el hilo fue creado por el usuario actual, no habrá resultados. – vian

+0

hey, me preguntaba si hay una nueva forma mejor de esto? Esto solo devuelve mensajes creados por el amigo. – Michelle

Cuestiones relacionadas