1

Resolved

Birthday is a string, should be a DateTime

description

var uids=new string[] { FbContext.Session.Uid.ToString() };
var fields=new string[] { "birthday","birthday_date"};
var getInfoResponse=FbContext.Users.GetInfo(uids,fields).Value[0];
Console.Write("Birthday = "+getInfoResponse.Birthday+"<br />");
 
using birthday_date field, you should be able to parse the returned date into a DateTime.

comments

DanielSchaffer wrote May 13, 2009 at 2:49 PM

Working on this... is the string that is returned always the same format, or does it vary based on region? For example, "November 3" for English, or "03 Novembre" for French.

DanielSchaffer wrote May 13, 2009 at 2:50 PM

http://wiki.developers.facebook.com/index.php/Users.getInfo says "No guaranteed format". Fun! I guess I can do a first iteration, and we can augment as we discover strings that aren't covered.

DanielSchaffer wrote May 13, 2009 at 2:58 PM

I just noticed the difference between "birthday" and "birthday_date"... this should make things much easier.

wrote May 13, 2009 at 3:11 PM

DanielSchaffer wrote May 13, 2009 at 3:24 PM

This feature is available in the latest changeset in source control.

tubededentifrice wrote May 13, 2009 at 3:42 PM

That's why you should use the "birthday_date" property instead of the "birthday" property.

tubededentifrice wrote May 13, 2009 at 3:43 PM

Sorry, just saw your comment about this difference

wrote Aug 3, 2009 at 2:48 PM

wrote Feb 14, 2013 at 7:50 PM

wrote May 16, 2013 at 9:55 AM

wrote May 16, 2013 at 9:55 AM

wrote Jun 14, 2013 at 7:15 AM