The sample posted in the documentation, at: http://developers.facebook.com/docs/reference/fql/ is incorrect and does not work. (php)
$fql_query_url = https://graph.facebook.com/
. /fql?q=SELECT+uid2+FROM+friend+WHERE+uid1=me()
. & . $access_token;
$fql_query_result = file_get_contents($fql_query_url);
=> there are two / : ...facebook.com//fql... => the word "&access_token" is missing.
However, even issuing the correct url, the function does not seem to return anything... Here is the code I have been using: (function is passed $id, like 12345678)
$Fb = new Facebook(array( appId =>FB_API_ID, secret =>FB_API_SECRET));
$access_token = $Fb->getAccessToken();
$fql_query_url = "https://graph.facebook.com/fql?q=SELECT+uid2+FROM+friend+WHERE+uid1=".$id."&access_token=" . $access_token;
$resp = file_get_contents($fql_query_url);
$var = json_decode($resp, true);
$txt .= "<br /><b>FQL QUERY:</b><br />" . display_tree($var);
有些人这样做了吗?