FQL friends_request为空结果

时间:2012-01-22 12:47:12

标签: php facebook-fql

目前我正在查询FQL friends_request表,但它返回空结果... 我有read_request权限

这是我的代码:

try {
      $fql = 'SELECT uid_from, time, message FROM friend_request WHERE uid_to = me()';
      $ret_obj = array(
                       'method' => 'fql.query',
                       'query' => $fql );
                       $fqlResult   =   $facebook->api($ret_obj);  

foreach($fqlResult as $result)
{
  print_r($result);

}

1 个答案:

答案 0 :(得分:1)

以下是使用Graph API(为我工作)的相同查询:

try {
// ...
    $fql = urlencode('SELECT uid_from, time, message FROM friend_request WHERE uid_to = me()');
    $fqlResult = $facebook->api("/fql?q=$fql");
    if(!empty($fqlResult['data'])) {
        foreach($fqlResult['data'] as $result) {
            print_r($result);
        }
    }