I need to retrieve a specific Page using FQL.
If you know the
the Page you want, this is easy:
SELECT name, type, pic_square FROM page WHERE page_id = $page_id;
If you don’t know the
but do know the
name, you can still
find it, as long as you know a user who’s a fan:
SELECT page_id, pic_square, type FROM page WHERE name = $name AND page_id IN (SELECT page_id FROM page_fan WHERE uid = $user;
This is a little harder than some of the comparable queries on
other tables because there’s no way to do this without a subquery,
which is dependent on having a
As noted earlier, the outcome is that this will work only when the
loggedinuser or one of his
friends is a fan of the Page you’re looking for.
You’ll get an empty set if the current
loggedinuser doesn’t have permission to see
the Pages of the user you’re querying on.