有谁知道为什么我收到以下错误消息?我开始了解 Facebook 开发的世界,但找不到简单的答案。
代码:
$twitterUrl ="http://query.yahooapis.com/v1/public/yql?q=";
$twitterUrl .= urlencode("select * from twitter.status where id='jzm'");
$twitterUrl .="&format=json";
$twitterFeed = file_get_contents($twitterUrl, true);
$twitterFeed = json_decode($twitterFeed);
print_r($twitterFeed);
收到错误:
stdClass Object ( [error] => stdClass Object ( [lang] => en-US [description] => No definition found for Table twitter.status ) )
最佳答案
尝试将 &env=http://datatables.org/alltables.env
添加到您的查询中。
$twitterUrl ="http://query.yahooapis.com/v1/public/yql?q=";
$twitterUrl .= urlencode("SELECT * FROM twitter.status WHERE id='jzm'");
$twitterUrl .="&format=json";
$twitterUrl .="&env=http://datatables.org/alltables.env";
$twitterFeed = file_get_contents($twitterUrl, true);
$twitterFeed = json_decode($twitterFeed);
print_r($twitterFeed);
关于php - 如何修复未找到表定义的错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8485311/