* 更新 數據正在返回但未輸出到瀏覽器。當我在下面的答案中使用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