Recent

Author Topic: Google API contact  (Read 1850 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Google API contact
« on: April 16, 2018, 12:23:41 pm »
Hi guys, I need to use google bees to add / edit / delete contacts. Only I can not find examples to do it. All I need is a small example that adds a contact, then from there I develop what I need. Thanks so much
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

rvk

  • Hero Member
  • *****
  • Posts: 6163
Re: Google API contact
« Reply #1 on: April 16, 2018, 12:52:16 pm »
First you would need to get OAuth 2.0 working.
After that it's just calling the correct URL from the Google Contacts API to edit contacts.

All I need is a small example that adds a contact, then from there I develop what I need.
There is no "small" example.
Getting OAuth 2.0 to work is a challenge all on it's own.

In FPC there are libraries in fpc\packages\googleapi\src but I haven't tried those.
I'm also not aware of any examples which use those libraries.

For Google Drive/Calendar/OAuth 2.0 I once created a "simple" example:
https://github.com/rvk01/google-oauth2

Using it to add "Contacts" should be relatively easy.

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: Google API contact
« Reply #2 on: April 17, 2018, 08:18:39 am »
Thank you rvk.
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018