是否可以使用fql返回满足某些要求的用户朋友,即返回计算机科学专业的朋友等?下面是我用来返回朋友数据的当前fql查询,如何修改这些查询来实现这一点,如果没有,还有什么替代解决方案?

 try{
        $fql    =   "select name,education,work from user WHERE uid IN (select uid2 from friend where uid1=($user))";
        $param  =   array(
            'method'    => 'fql.query',
            'query'     => $fql,
            'callback'  => ''
        );
        $fqlResult   =   $facebook->api($param);
    }
    catch(Exception $o){
        d($o);
    }
}

最佳答案

不确定这是否有效,但尝试将您的fql查询添加到类似的内容中,

select name,education,work from user WHERE uid IN (select uid2 from friend where uid1=($user) AND education.type = "Computer Science"

关于php - 使用FQL返回 friend 的数据,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/8407696/

10-10 22:05