[英]Uncaught exception: 1: An unknown error occurred thrown in Facebook API, FQL error
When I try to do an FQL to catch all the photos in a friend's checkins, I'm getting an unknown error from the Facebook API. 当我尝试执行FQL捕捉朋友的签到中的所有照片时,我从Facebook API中收到未知错误。
Here's my code: 这是我的代码:
$photo_params = array('method' => 'fql.query','query' => "SELECT attachment, post_id FROM stream WHERE post_id IN ( SELECT post_id FROM checkin WHERE author_uid in (SELECT uid2 FROM friend WHERE uid1 = me()))",);
//Run query
$result_photo = $fbapi->api($photo_params);
I'll handle the attachment data to get the photo's URL then. 我将处理附件数据,然后获取照片的URL。
How do I fix this? 我该如何解决?
You're using Graph API in a wrong way. 您以错误的方式使用了Graph API 。 The new way of doing FQL queries via Graph API is: 通过Graph API进行FQL查询的新方法是:
$query = "SELECT attachment, post_id FROM stream WHERE post_id IN ( SELECT post_id FROM checkin WHERE author_uid in (SELECT uid2 FROM friend WHERE uid1 = me()))";
$result_photo = $fbapi->api('/fql', 'GET', array('q'=>$query));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.