开发者

fql.query is returning the empty array when i try to select the photos and albums

$friends = $facebook->api(array('method'=>'fql.query',
                                'query'=>'SELECT src_big, pid, src 
                                            FROM photo 
                                          开发者_StackOverflow中文版 WHERE owner = "$user_id" '));
print_r($friends)

Please advise me... I want the select to get the photos and albums and comment, recent updates.


To return the photos you need first to select the albums. Try it:

SELECT src_big, pid, src FROM photo WHERE aid IN (SELECT aid FROM album WHERE owner = "$user_id")


In addition to the above: Permission to photos is also required: if you have only user_photos, you cannot query the friend's photos etc. So request user permissions:

"user_photos","friends_photos"

as described in http://developers.facebook.com/docs/reference/api/permissions/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜