* 更新 数据正在返回但未输出到浏览器。当我在下面的答案中使用urlencode建议后,我查看了源代码。**使用PHP提取FQL数据
用这个拉出我的头发。
基于以下链接:
此代码应努力拉我所需要的表中的数据:
ini_set("display_errors","2");
ERROR_REPORTING(E_ALL);
$contents = file_get_contents('https://api.facebook.com/method/fql.query?query=SELECT vid, owner, title, description, thumbnail_link, embed_html, updated_time, created_time FROM video WHERE owner= *******myID****');
echo $contents;
但我正在以下错误:
Warning: file_get_contents(https://api.facebook.com/method/fql.query?query=SELECT vid, owner, title, description, thumbnail_link, embed_html, updated_time, created_time FROM video WHERE owner= ******myID*****) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /vservers/mywebsite/htdocs/test.php on line 5
任何人都可以看到我做错了什么?
如果您在尝试此浏览器,你会得到结果吗? – fingerman 2011-04-24 00:20:48
以上错误是浏览器输出的内容。 – Denoteone 2011-04-24 00:26:23
我的意思是网址:https://api.facebook.com/method/fql.query?query=SELECT vid,拥有者,标题,描述,缩略图链接,embed_html,updated_time,created_time从视频WHERE所有者= ***** ** myID **** – fingerman 2011-04-24 00:32:58