I am parsing contacts from Gmail, and creating a sync functionality with my product. But on my script i'm having a hard time determining which contacts get 'deleted' from gmail.
EXAMPLE: If I have John Doe in my Application, along with Gmail... (and they are synced with the gmailId). Later on down the road, if the user DELETES the contact John Doe, and I run my SYNC, how do I determine that the contact was deleted?
I need to know where to throw a trigger to delete the same contact within my database. I currently have this to obtain information on each contact sent through.
$xml = simplexml_load_string($entry->getXML());
$obj = new stdClass;
// EDIT LINK
$obj->gmailUrl = rawurlencode($entry->id);
$obj->delete = (string) $xml->groupMembershipInfo['deleted'];
// FIRST Name
$obj->firstName = (string) $xml->name->givenName;
Previous in my code i'm also query google with these extra params.
$query->setParam('updated-min', $updatedMin);
$query->setParam('showdeleted', 'true');
$query->setParam('requirealldeleted', 'true');
Any help would be appreciated!