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

  $ 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;   

Previously in my code I also google query with these extra parameters

  $ query-> SetParam ('update-min', $ updatedMin); $ Query-> Setup ('shodited', 'true'); $ Query-> SetParam ('requirealldeleted', 'true');   

Any help would be appreciated!

I'm not sure about any particular hook, nor do I have a clear Can see the deleted field, but the other way to solve the problem is here ...

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 showdeleted as false .

Example ...

  $ local = array (1, 3, 5, 7, 9);   

You run the full sync ...

  $ remote = array (, 1, 3, 5, 9);   

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.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

c# - Confused over DLL entry points (entry point not found exception) -