I want to get all users with their name and facebook username in a group. The following query should do it but it doesn't return usernames.
SELECT name, username from profile where id in (SELECT uid FROM group_member WHERE gid = 'GROUP_ID')
Even though almost all users have an username, username field is null for each user in the result.
I don't think Facebook hides this information because of privacy issues because I'm able to get username with graph api using http://graph.facebook.com/uid.