当我尝试用FQL来捕捉朋友签到的所有照片时,我从Facebook API中收到一个未知错误。
这是我的代码:
$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);
我会处理附件数据以获取照片的网址。
我该如何解决这个问题?
答案 0 :(得分:0)
你以错误的方式使用Graph API。通过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));