fql.multiquery无法按预期工作

时间:2014-07-11 15:52:50

标签: facebook facebook-fql

$pairs = $facebook->api(array(
        'method' => 'fql.multiquery',
        'queries' => array(
            'query1' => 'SELECT uid1 FROM friend WHERE uid2 = me()',
            'query2' => 'SELECT uid1, uid2 FROM friend WHERE uid1 IN (#query1) AND uid2 IN (#query1)'
        )
));

这给了我一个Parser error: unexpected '#query1' at position 45.错误,我不明白。我认为上面的确是如何工作的?

1 个答案:

答案 0 :(得分:1)

构建query2的正确方法是

SELECT uid1, uid2 FROM friend WHERE uid1 IN (SELECT uid1 FROM #query1) AND uid2 IN (SELECT uid1 FROM #query1)

但总的来说这个电话效率很低。请求将失败,因为它太耗费资源。你可能会打破每个朋友的第二次电话会议。