Return only albums with at least one photo

5

I'm currently doing the following FQL query to return all the logged-in user albums that have at least one photo (with the number of photos):

SELECT object_id, name, photo_count 
FROM album 
WHERE owner = me() AND photo_count > 0

Unfortunately, platform version 2.1 has removed FQL support.

I know I can get the values in question with the following call:

me/albums?fields=name,id,count

But I could not find a way to filter empty albums. Iterating each value and checking those with count non-zero is not very convenient since a user can have a large number of albums; I would be required to iterate over multiple pages just to count the number of non-empty albums.

Cross posting for SOen: Question at English

    
asked by anonymous 19.09.2014 / 17:03

1 answer

1

Unfortunately there is no possible manipulation for this purpose of filtering or sorting results, Graph API is very strict in this respect.

As version 2.0, which still supports FQL , will be supported until 07/08 / 2016 , my suggestion is to continue using FQL to make this and other more complex queries and migrate the simpler accesses to version 2.1.

Because FQL is infinitely more powerful, in terms of complexity and the possibility of data analysis, than the Graph API only. We hope Facebook will provide an alternative that meets most of the needs by 2016, otherwise it could cause problems for many people.

    
23.09.2014 / 16:32