FQL 查询错误
这是我的代码
$ids = join(", ",$man);
if ( !isset($_SESSION[$appID.'_FQLResult']) ) {
$FQLQuery = "SELECT uid, sex, pic_square FROM user WHERE uid in ($ids)";
$FQLResult = $facebook->api(array( 'method' => 'fql.query', 'query' => $FQLQuery, 'access_token'=>$fbme['access_token'] ));
$_SESSION[$appID.'_FQLResult'] = $FQLResult;
} else {
$FQLResult = $_SESSION[$appID.'_FQLResult'];
}
echo $ids;
echo $FQLResult;
有一个错误 当我 echo $ids 时,它显示 $ids 的值,但是当我 echo $FQLResult 时,仅显示“数组”写入此 fql 查询中有什么问题? 我该如何解决这个问题? 我认为这个查询有问题 $FQLQuery = "从用户 WHERE uid in ($ids) 中选择 uid、性别、pic_square";
This is My Code
$ids = join(", ",$man);
if ( !isset($_SESSION[$appID.'_FQLResult']) ) {
$FQLQuery = "SELECT uid, sex, pic_square FROM user WHERE uid in ($ids)";
$FQLResult = $facebook->api(array( 'method' => 'fql.query', 'query' => $FQLQuery, 'access_token'=>$fbme['access_token'] ));
$_SESSION[$appID.'_FQLResult'] = $FQLResult;
} else {
$FQLResult = $_SESSION[$appID.'_FQLResult'];
}
echo $ids;
echo $FQLResult;
There is an error
when i echo $ids it shows the value of $ids but when i echo $FQLResult is shows only "array" written whats wrong in this fql query?
how i can fix this?
I think there is something wrong in this query
$FQLQuery = "SELECT uid, sex, pic_square FROM user WHERE uid in ($ids)";
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
implode()
代替 < a href="http://php.net/manual/en/function.join.php" rel="nofollow">join()
print_r($FQLResult);
var_dump()
/fql?q=YOUR_QUERY
),请阅读此处implode()
directly instead ofjoin()
print_r($FQLResult);
var_dump()
/fql?q=YOUR_QUERY
), read here