FQL page_fan查询只筛选一个页面的结果

时间:2012-03-15 10:40:34

标签: facebook facebook-like facebook-fql facebook-page

我有这样的fql查询:

SELECT uid,page_id,type,profile_section,created_time FROM page_fan WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ;

有没有办法只获得page_id = XXXXXX的结果? 因为page_id不可索引..我希望有一种方法来过滤它。

1 个答案:

答案 0 :(得分:0)

我想我找到了一个很好的解决方案,对我来说,能够吸引不是页面风扇的朋友。

$facebook_result = $this->facebook->api(array(
    'method' => 'fql.multiquery',
    'queries' => array(
        'friends_liking_page' => 'SELECT uid, page_id FROM page_fan WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND page_id = ' . $page_id,
        'result' => 'SELECT uid, name, pic FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me() AND NOT (uid2 IN (SELECT uid FROM #friends_liking_page)))'
    )
));