我正在使用从http://github.com/facebook/php-sdk
下载的facebook.php代码
$fql = 'SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1='.$user.') AND has_added_app = 1';
$_friends = $facebook->api_client->fql_query($fql);
抛出错误如下
PHP致命错误:致电会员 函数fql_query()在非对象上 在 /home/elankeer/public_html/friend/index.php 在第292行
请帮助我!!
答案 0 :(得分:4)
在新的facebook api sdk中,我们需要执行以下代码
$_friends = $facebook->api(array(
'method' => 'fql.query',
'query' => 'SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1='.$uid.') AND has_added_app = 1',
));
http://forum.developers.facebook.net/viewtopic.php?pid=223391