Afficher les commentaires de tous ceux qui l'ont posté sur ma page
Cela donne une page blanche
Où est-ce que je me trompe ?
FB.api({
method: 'fql.multiquery',
queries: {
query1: 'SELECT post_fbid, fromid, text, time FROM comment WHERE post_id="'+postID +'"',
query2: 'SELECT id, name, url, pic FROM profile WHERE id IN (SELECT fromid FROM #query1)'
}
});
</script>
<script>
function(response) {
var comments = response[0].fql_result_set;
var users = response[1].fql_result_set;
//loop through the comments
for(var i = 0, j = comments.length; i<j; i++){
for(var x = 0, y = users.length; x<y; x++){
if(comments[i].fromid == users[x].id){
//we have a match, this comment is from user users[x]
//process users[x]
//break the inner for loop, since we already have a match
}
}
}
}