php - Google Contacts Api -> Which contacts were deleted? -
I'm parsing contact with Gmail, and I'm building a sync functionality with my product. But on my script I'm finding it difficult to decide which contacts are 'deleted' from Gmail
Example: If I have John Doe , then my application In, with Gmail ... (and they have been synced with Gmail ID). Later, if the user deletes the contact John Do << / strong>, and I run my sync, How do I determine if the contact was deleted? I currently have information on every contact sent through this Previously in my code I also google query with these extra parameters Any help would be appreciated! I'm not sure about any particular hook, nor do I have a clear When you complete your sync, or single item update, if no special contact is returned now , You can mark it as deleted. Note: If you see Example ... You run the full sync ... Comparison of two arrays will show that 7 has been removed. Similarly, if you are syncing an item, if it does not return anything then you can delete it.
$ xml = simplexml_load_string ($ entry-> getXML ()); $ Obj = new stdClass; // edit link $ obj- & gt; GmailUrl = rawurlencode ($ entry-> id); $ Obj- & gt; Delete = (string) $ xml- & gt; Groupmempressify ['deleted']; // First name $ obj- & gt; First name = (string) $ xml- & gt; Name- & gt; given names;
$ query-> SetParam ('update-min', $ updatedMin); $ Query-> Setup ('shodited', 'true'); $ Query-> SetParam ('requirealldeleted', 'true');
Can see the deleted field, but the other way to solve the problem is here ...
showdeleted as
false .
$ local = array (1, 3, 5, 7, 9);
$ remote = array (, 1, 3, 5, 9);
Comments
Post a Comment