Facebook API - Only retrieve friends of user who are 21+
I'm in need of a way to fetch the friends of a user but only those who are 21+.
I'm aware of "admin.setRestrictionInfo" but it doesn't seem to be working.
Seeing as how the Facebook documentation is in a constant state of disarray I wouldn't put it past Facebook to deprecate the call and not updat开发者_如何学JAVAe the docs.
Any help would be much appreciated.
Thanks!
You sure can, but you need to ask for the *friends_birthday* permission. Here are the official up to date docs: http://developers.facebook.com/docs/authentication/permissions
Of course, you'll need to get the whole list and filter by birthday or do an FQL query to get only users aged 21+. Also note that users that don't share or set their birthday have the birthday on 01.01.1970 by default.
精彩评论