Facebook API返回Uncaught Exception:604:您的语句不可索引

时间:2012-09-03 03:49:37

标签: php facebook codeigniter facebook-graph-api

我目前正在制作一个应用程序,它将在我的墙上阅读一些帖子。 问题是我继续收到此错误

Fatal error: Uncaught Exception: 604: Your statement is not indexable. The WHERE clause must contain an indexable column. Such columns are marked with * in the tables linked from http://developers.facebook.com/docs/reference/fql thrown in \application\libraries\base_facebook.php on line 1238

我已经拥有了这些权限,我甚至在我的应用设置上添加了一些其他权限。 read_stream offline_access read_insights

AppId,secret和access_token都已设置。

更新:现在,当我将查询更改为此

时,API会返回不同的错误
$fql = "SELECT post_id, actor_id, target_id, message FROM stream WHERE source_id = me() AND created_time > 1346277600 LIMIT 50";

更新: 我现在得到这个错误

Fatal error: Uncaught Exception: 102: Requires user session thrown in \application\libraries\base_facebook.php on line 1238

2 个答案:

答案 0 :(得分:4)

答案 1 :(得分:3)

我只是忘了把access_token放在facebook-> api电话

$data['posts'] = $this->facebook->api(array(
                   'method' => 'fql.query',
                   'query' => $fql,
                   'access_token'=>$facebook['access_token']
                 ));