目前我正在查询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);
}
答案 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);
}
}