Looking at a similar answer I'd say to use the URI returned and find the lookup key from there.
Something like this might work:
Uri contactData = data.getData();
Cursor c = getContentResolver().query(contactData, null, null, null, null);
String key = null;
if (c != null && c.moveToFirst()) {
key = c.getString(c.getColumnIndex(ContactsContract.Data.LOOKUP_KEY));
}