Myshor, so does it create duplicates even on clean profile?
"Problem" is this (it's very simplified):
1) When logging in, I request list of all contacts from your account. For contacts existing in your profile I update their name, avatar, etc. For contacts not in your profile yet I add them to your profile - these contact will have their name.
2) Then I request list of online people. In this response I get for most of contacts (mainly for mobile ones) only their ID (number) and no name. And I set statuses for these contacts. If this contact doesn't exists, I'll add (with only number instead of name).
You having contacts with numbers and duplicits could be explained only by:
a) not getting all friends in request #1 (this doesn't explain duplicits)
b) not working searching contact in profile (what are ids of these duplicit contacts? it should be numeric like 123456789. does it look different?)
c)
http://www.picturesnew.com/media/images/aliens-meme-image.jpeg :-)
... hmm, maybe I found something. Try this:
https://www.dropbox.com/s/yl267xrdwlz0qfl/FacebookRM.7z