グラフAPIを使用してFQLを実行しようとしています。
$graph_url = "https://graph.facebook.com/fql?q=".$fql."&access_token=". $access_token;
$output = json_decode(file_get_contents($graph_url));
var_dump($output);
これによりエラーが発生します
[function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request
$graph_url
の内容をブラウザにコピーして貼り付けると、期待どおりの結果が得られます。したがって、access_tokenとfqlクエリは正しいと確信しています。
また、コンテンツを取得しようとすると
$graph_url = "https://graph.facebook.com/me/?access_token=". $access_token;
$output = json_decode(file_get_contents($graph_url));
var_dump($output);
エラーは発生しませんが、期待どおりの結果が得られます。fqlクエリに何が欠けているのかわかりません。