Yes you can, but be aware that abid is not the Contacts Phone Number.
It is ABRecordGetRecordID
Try this code to open whatsapp with the contact named "Your Name" in your address book.
// Fetch the address book
ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(NULL,NULL);
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
dispatch_semaphore_signal(sema);
});
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
// find user
CFStringRef searchQuery = CFSTR("Your Contact Name");
CFArrayRef array = ABAddressBookCopyPeopleWithName (addressBook,searchQuery);
int items = CFArrayGetCount(array);
NSLog(@"found %i persons",items);
int abid = 0;
for (int i = 0; i < items; i++)
{
ABRecordRef person = CFArrayGetValueAtIndex(array, i);
abid = ABRecordGetRecordID(person);
NSLog(@"found person %i ",abid);
break;
}
if (abid > 0)
{
NSString* url = [NSString stringWithFormat:@"whatsapp://send?abid=%i&text=Hola",abid];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
}