简体   繁体   中英

How to merge google contacts datas by phone number and/or e-mail?

Is there a best practice to merge contacts?

My phone is connected to the Google account, so it sync with GMail contacts. I can download with Google API PHP client my contact datas. But I have contacts from my phone, from skype and from viber, facebook, etc. So I have multiple contacts for my friends.

It looks like this:

Contact #1:

Name: Friend One
Phone number: +1234567890
E-mail: friend-one@example.com

Contact #2:

Name: One Friend
Phone number:
E-mail: friend-one@example.com
E-mail: one-friend@example.com

Contact #3:

Name: Uncle Joe
Phone number: +9876543210
Phone number: +1234567890
E-mail: unclejoe@example.com

Is there a best prctice in PHP to merge this three contacts into one, what is looks like this:

Name: Friend One
Nickname: Uncle Joe
Phone number: +1234567890
Phone number: +9876543210
E-mail: friend-one@example.com
E-mail: one-friend@example.com
E-mail: unclejoe@example.com

It's irrelevant whichwas is the "Name" or "Nickname", I just need to keep the datas.

Is there a best practice to merge contacts?

If you check the Google Contacts API there is no guides here that can merge the two contacts. Just check this documentation for you to know the only possible things right now that you can do with this API.

If you want this feature, I suggest you to create a feature request about it.

For more information, check this related SO question .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM