I am accessing a contact from the address book. I don't want to import a Facebook contact while copying the rest of the contacts. So how can I identify if the contact was imported from Facebook? For copying the array of people, I'm using this simple method:
ABRecordRef source = ABAddressBookCopyDefaultSource(ref);
NSArray *allContacts = (__bridge NSArray *)(ABAddressBookCopyArrayOfAllPeopleInSource(ref, source));
for (int i = 0; i < [allContacts count]; i++) {
Person *person = [[Person alloc] init];
ABRecordRef contactPerson = (__bridge ABRecordRef)allContacts[i];
NSString *firstName = (__bridge_transfer NSString *)ABRecordCopyValue(contactPerson, kABPersonFirstNameProperty);
NSString *lastName = (__bridge_transfer NSString *)ABRecordCopyValue(contactPerson, kABPersonLastNameProperty);
int ID=ABRecordGetRecordID(contactPerson);
CFTypeRef num=ABRecordCopyValue(contactPerson, kABPersonPhoneProperty);
NSString *phoneNumber = (__bridge NSString *) ABMultiValueCopyValueAtIndex(num, 0);
if(phoneNumber.length>0)
{
[List addObject:person];
}
so which property of record can able to detect Facebook contact ?