O'Reilly logo

Facebook Cookbook by Jay Goldman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Retrieving an Album

Problem

I need to retrieve a Facebook album using FQL.

Solution

This is your most basic album-related query:

SELECT aid, cover_pid, name, link FROM album WHERE owner = $uid;

Discussion

Since SELECT * isn’t supported in FQL, you’ll have to list out the actual fields you’re looking for. This would be enough to let you display someone’s albums with links back to the original. Remember that this query will only return albums that the current loggedinuser has permission to see.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required