Reputation: 13
$friends = $facebook->api(array('method'=>'fql.query',
'query'=>'SELECT src_big, pid, src
FROM photo
WHERE owner = "$user_id" '));
print_r($friends)
Please advise me... I want the select to get the photos and albums and comment, recent updates.
Upvotes: 1
Views: 1375
Reputation: 658
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/
Upvotes: 0
Reputation: 26
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")
Upvotes: 1