9

I am trying to determine when a user joined facebook. So far what I have come up with is scanning the users profile pictures for the first one ( i seem to remember that in the early days, facebook forced you to upload a profile picture ) and take the timestamp from there. I thought of doing the same thing with wall posts too...

Does anyone have any ideas on how to get the most accurate information about when a user created his/her account?

5 Answers5

13

There is no way to get this field, but what many applications do to approximate this is take the oldest photo in the 'Profile Pictures' album - which for me is within a week of my actual signup date

Igy
  • 43,710
  • 8
  • 89
  • 115
  • Profile pictures is the best i can think of, other posts aren't available prior to (approx.) june 2009, so photos are the easiest to search far into the past – Igy Sep 12 '11 at 21:58
  • This will work as long as the profile owner hasn't deleted older photos from the profile pictures album. It will always be at least as old as the oldest photo in that album, but it could be older if the owner did some cleanup in his album. – Yanick Girouard Sep 30 '20 at 13:12
7

I was thinking - maybe ID will be a useful tool. Every time a user creates new accouts it should get higher ID. I googled and found that there is a method to estimate the accout creation date by ID and Massoud Seifi from metadatascience.com gathered some good data about it. enter image description here

read this article:

http://metadatascience.com/2013/03/11/inferring-facebook-account-creation-date-from-facebook-user-id/

and here is some IDs to downlaod:

http://metadatascience.com/2013/03/14/lookup-table-for-inferring-facebook-account-creation-date-from-facebook-user-id/

Marcin Majchrzak
  • 662
  • 1
  • 11
  • 22
  • 1
    This solution was the best, but i think it no longer works, since the introduction of app-scoped user-ids, more info here: https://developers.facebook.com/docs/apps/upgrading/#upgrading_v2_0_user_ids – Juan Techera May 16 '14 at 13:53
  • 1
    I was using this method for the last year and I can confirm that it doesn't work anymore. – Coccodrillo Jun 28 '14 at 11:02
1

Beside looking at oldest user's profile picture or album (which doesn't work all the time), you can estimate the Facebook account creation date by finding the creation date of the oldest user post (you can find some code for doing that here).

Another approach is explained here. It shows how to figure out the creation date of a Facebook account without having to call the Facebook API, just based on the user’s Facebook UID. You can also download here the lookup table showing the correlation between Facebook UID and Facebook Account Creation Date.

AccessToken
  • 224
  • 4
  • 8
1

Using the profile picture suggestion, this is how I did it: Maybe not the best way but this is the best I can do with my actual objective C knowledge

__block NSDate *oldestPictureDate = [NSDate date];
[[[FBSDKGraphRequest alloc]  initWithGraphPath:@"me" parameters:@{@"fields": @"albums.fields(name,photos.fields(created_time))"}]
    startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
          NSArray* albums = result[@"albums"][@"data"];
          NSUInteger index = [albums indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) {
              return [obj[@"name"]  isEqualToString: @"Profile Pictures"];}];
          if (index != NSNotFound) {
              NSDictionary *profileImages = albums[index];
              NSDictionary *photos = profileImages[@"photos"];
              NSArray *data = photos[@"data"];
              for (NSDictionary *picture in data) {
                  NSDate* pictureCreationDate = [localDateYYYYMMDD dateFromString:[picture[@"created_time"] substringToIndex:10]];
                  if([oldestPictureDate compare:pictureCreationDate] > 0) oldestPictureDate = pictureCreationDate;
              }
          }
    }
 ];

with

localDateYYYYMMDD = [[NSDateFormatter alloc] init];
[localDateYYYYMMDD setTimeZone:[NSTimeZone timeZoneWithName:@"GMT"]];
[localDateYYYYMMDD setDateFormat:@"yyyy-MM-dd"];
Laurent
  • 197
  • 2
  • 12
0

If you are indeed trying to find when did a user join Facebook, I agree with other's answers.

The best way I have been able to find out (which is also cheaper than having to reiterate through tons of posts) is accessing the earliest "profile pictures" of the user. This is making the assumption that a user would post a profile picture soon after creating their account.

Or why not just use Profile Pictures album? Once you can get access to "Profile Pictures" album, you might be able to use created_time field for the album (or sort Profile Pictures by created_time for individual photos).

Even if the earliest photo was deleted, what are the chances that the user stays without any profile picture for a long time?

Reference: https://developers.facebook.com/docs/graph-api/reference/v2.0/album

A Sharma
  • 626
  • 1
  • 5
  • 13