I have a fql query:
{"e426262700718049":"SELECT name, start_time, location, creator, pic_square FROM event WHERE eid=426262700718049","c426262700718049":"SELECT name FROM profile WHERE id IN (SELECT creator FROM #e426262700718049)"}
In the Graph Api Explorer it works totally fine, but the sdk just return empty array. With different queries it works totally fine.
That’s how I implemented it:
public function mquery($queries)
{
$params = array(
'method' => 'fql.multiquery',
'queries' => $queries
);
return $this->getFb()->api($params);
}
Any idea? 🙂
The issue is related to permissions, you probably not authorized the user while trying to retrieve that data with SDK.
Your query returns empty data-set for me with both Graph API and Graph Explorer, for you it returning data that isn’t available to unauthorized users (which is probably the case for query with SDK).
If you’ll call this without
access_tokenat all you will get an exception, but with SDK usage applicationaccess_tokenis used by default. Just be sure to authorize the user prior querying to get correct results.BTW, you can use Graph API for the same work instead of old rest call: