Reputation: 143
My app needs to suggest to user friends who have visible photos (photos where privacy settings let them be visible at least to friends.) I am trying to filter out users who did not make their photos public to their friends. I know that the privacy table can identify the privacy settings for a specific object id
SELECT value, description FROM privacy WHERE id = 10150146071791729
How do I do it for all of the user's photos?
Upvotes: 1
Views: 165
Reputation: 1202
It doesn't seem like you can get this result directly. You might need to do a batch query, first get all the album-ids that have been uploaded by the user's friends -
select aid, owner from album where owner in (select uid2 from friend where uid1 = me())
And then run the aid via the query you pasted above and eliminate the ones that are set to private.
Upvotes: 1