Php Facebook API返回未捕获的异常:604:您的语句不可索引
我目前正在做一个应用程序,可以在我的墙上看到一些帖子。 问题是我一直在犯这个错误Php Facebook API返回未捕获的异常:604:您的语句不可索引,php,facebook,codeigniter,facebook-graph-api,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
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
Fatal error: Uncaught Exception: 102: Requires user session thrown in \application\libraries\base_facebook.php on line 1238
我已经有了这些权限,我甚至在我的应用程序设置中添加了一些其他权限离线读取流\u访问读取洞察
AppId、secret和access_令牌都已设置
更新:现在,当我将查询更改为
$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: 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
Fatal error: Uncaught Exception: 102: Requires user session thrown in \application\libraries\base_facebook.php on line 1238
见:
只有少数字段是可索引的,因此其中一个字段应在FQL的where
子句中使用。
你的问题似乎对我很有效
我只是忘了在facebook->api调用中放置
access\u令牌
$data['posts'] = $this->facebook->api(array(
'method' => 'fql.query',
'query' => $fql,
'access_token'=>$facebook['access_token']
));
我找到了答案,不过还是要谢谢你。如果不是您的所有capsACCESS\u TOKEN\u此处
我不会注意到api调用中的错误: