Reputation: 1460
Is there an “elegant way” to fetch last 3 photos from each album of user? I’ve tried using this multiquery, but it doesn’t work:
$fqls = array(
"q1" => "SELECT aid FROM album WHERE owner = $page_id",
"q2" => "SELECT src_small,created FROM photo WHERE aid IN (SELECT aid FROM #q1) ORDER BY created DESC LIMIT 3"
);
Upvotes: 0
Views: 50
Reputation: 2109
with graph api, you can do something like [user_id]/albums?fields=photos.limit(3)
Upvotes: 1