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

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!!

-------------Problems Reply------------

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

Category:facebook Views:0 Time:2010-08-28
Tags: facebook

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.239 (s). 11 q(s)