5
I am currently making the following FQL query to return all the logged-in user’s Albums that have at least one photo (with the amount of photos):
SELECT object_id, name, photo_count
FROM album
WHERE owner = me() AND photo_count > 0
Unfortunately version 2.1 of the platform removed FQL support.
I know I can get the figures in question with the following call:
me/albums?fields=name,id,count
But I couldn’t find a way to filter out empty albums.
Iterate each value and check those with count
other than zero is not very convenient as a user may have a large amount of Albums; I would be required to iterate over multiple pages just to count the amount of non-empty albums.
Cross posting to Soen: Question in English
Anthony, from what I saw there is really no way to do this, the Graph API is quite restricted regarding the customization of the results... But I saw that version 2.0 will be supported until August 2016 (https://developers.facebook.com/docs/apps/changelog). Do you really need to make this migration? Could not continue in version 2.0 and using
FQL
for this purpose only, the other requests being made for version 2.1?– Wakim
Hi Wakim, yes, it’s an excellent suggestion. I’m contemplating the possibility of staying in version 2.0; 2.1 broke a lot for me. [Dull mode on] It seems that each upgrade on the Facebook platform introduces half a dozen worsenings; not to mention the unavailability and updates silent round and a half break some aspect of my application [Dull mode off]. Will they introduce filters like this in a later version of the API or will we run out of functionality? :(
– Anthony Accioly
I have no idea, I researched something but I didn’t find it. I never used the
FQL
directly, but I only used a little bit of the Graph API to retrieve and treat a user’s Timeline elements. I think they should provide some "polyfill" for this migration, theFQL
is very powerful, I can imagine how difficult it will be to migrate complex queries when they take off the air... It might be worth starting a discussion in the group (if there isn’t, I haven’t been able to join the group yet) https://m.facebook.com/groups/fbdevelopers/– Wakim
@Wakim, apparently there is no solution at all. If you want to turn your comment into an answer I can accept it. Hugs.
– Anthony Accioly