开发者

FQL query for photos returns photos from hidden (blocked) users. How to prevent this?

I request latest photos for a user using an FQ开发者_如何学GoL query, like the one below: SELECT pid, aid, owner, src_small, src_big, src, link, caption, created FROM photo WHERE aid IN (SELECT aid FROM album WHERE owner IN (SELECT uid2 FROM friend WHERE uid1=) ORDER BY modified_major DESC LIMIT 300) ORDER BY created DESC LIMIT 500

It works well but I believe it doesn't respect the setting where the user block specific users on the facebook page. So in my app, he sees all the photos, and he's not happy :).

Now, I see that in user table there's is_blocked property, but it's not indexed so I can't use it in a WHERE clause. I also don't want to call FB for every user I get just to check for that property and filter based on that in the app itself.

So, first of all, am I correct that this query doesn't respect blocked users settings? If yes, is there a way to respect this setting using FQL?


You may look at privacy table. There is id column which represent an image object as well and deny field with a list of users that cannot see the object. I think you should use a fql.multi-query to resolve this. Some info about fql.multi-query you can find at this topic.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜