tags:

views:

118

answers:

1

I am using facebook.php which is downloaded from http://github.com/facebook/php-sdk

Below code

$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);

Throw error as below

PHP Fatal error: Call to a member function fql_query() on a non-object in /home/elankeer/public_html/friend/index.php on line 292

please help me!!

+1  A: 

In new facebook api sdk we need to do the following code

$_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

Elankeeran

related questions