php - 如何修复未找到表定义的错误?

标签 php facebook yql

有谁知道为什么我收到以下错误消息?我开始了解 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/

相关文章:

javascript - Facebook Messenger 'get started' 按钮

ios - FBSDKSharing 回调不返回结果

android - Android Facebook SDK 4.0 中的 Facebook OpenGraph 故事

javascript - 不匹配的字符 ' ' 期望 '\"'

php - 我可以在 Mysql 查询中使用 PHP 函数吗?

php - 在 phpmyadmin SELECT WHERE 1 中显示第 0 - 0 行(总共 1 行,查询耗时 0.0008 秒。)

yql - YQL:不再支持html表

json - YQL:如何获取一个国家的所有城市

php - Mysql表自定义自增

php - 我如何获得任何浏览器的 javascript 状态?