6

I'm using facebook connect to let users login my application easy. It works well, but, after users allow me to get their facebook info as email, birthday, gender and so on, facebook gives me back these data in user's specific locale.

So, if a user has facebook in english i'll get {"gender" : "male"}, and if a user has facebook in italian, for example, i'll get {"gender" : "uomo"}. Facebook translates the value using user's locale. The problem is that i have to use these user info to make some search on my app, and it's impossible to me to say, for example, "select all 'male' users".

Is there a way to make facebook return user's info in a specific locale? So I will be able to know how to use these data, not only displaying those.

Thanks

Stefan Manastirliu
  • 3,704
  • 3
  • 24
  • 18
  • When you go to user table api it says that solution for this can be found on "API Results and Localization" page, link to which is of course broken and removed from robots so you can't even get cached copy of it anymore. While normal developers adding documentation, facebook developers removing it. – serg Oct 12 '10 at 15:54
  • Yes, that's frustrating. It seems that major of web app using fb-conncet to register users didn t resolve this issue. They're able to get name, surname, and email, but then they ask you your birthday and gender even if those are public. Stackoverflow besides it seems to be able to get birthday from facebook. Sure, date formats are "known" so u can parse the string and try to find the right format, maybe using the locale that facbook gives you back. But what about gender? Well, it's a bit strange that facebook developers doesn t handle this issue yet. – Stefan Manastirliu Oct 14 '10 at 14:35
  • I didn't find a solution about this problem. Now i get from facebook only user complete name and email, and then redirect it to a pre-filled form asking for missing data, such as, birthday and sex... – Stefan Manastirliu Nov 24 '10 at 10:13

1 Answers1

1

According to this page, the "sex" field always returns in English. Of course, the documentation for the "user" table doesn't have a "gender" field.

http://developers.facebook.com/docs/reference/fql/user/

Brent Baisley
  • 12,641
  • 2
  • 26
  • 39
  • Your example focused on the gender/sex. Look at the link. The field birthday_date come in a "machine-readable string". Email is just email, so that takes care of all 3 fields you mentioned. Facebook isn't going to translate "text" entered by the user. Not sure what else you need. – Brent Baisley Jan 13 '11 at 00:26
  • You can search on the locale field so only users from that locale are returned. That's not going to return the text in that language though. Just because someone is in es_ES, doesn't mean they can't enter their religion in German. Free form entry fields are returned as is. – Brent Baisley Jan 13 '11 at 11:25
  • @mat Please don't mod-flag answers for being "low quality." –  Jan 13 '11 at 14:45
  • Nice, it seems facebook fixed this issue. Now they return sex only in english and birthday_date as "machine-readable string", so you can use the datas in some way. When i posted the question they gived you back both fields translated in user selected locale. – Stefan Manastirliu Jun 06 '11 at 14:29