Skip to content

About

The fastest way to get users' email contact from Gmail and Microsoft Outlook.

Resources

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

EasyContact

The fastest way to get users' email contact from Google Gmail and Microsoft Outlook.

1. Create an application, get client id and secret at:

Microsoft Outlook

https://account.live.com/developers/applications/create

Google Gmail

https://console.developers.google.com/

2. Get id, secret and set redirect uri in above consoles, set them in google_config.json and microsoft_config.json.

{
    "client_id": "xxxxx",
    "redirect_uri": "http://xxxxxx",
    "client_secret": "xxxxx"
}

3. Usage

Let's take Gmail for example:

    // This is the controller method which redirect user to Goole authentication page.
    function auth_google(){
        $ec = new EasyContact();
        redirect($ec->google->getAuthUrl());
    }

    // This is the controller method Goole will redirect user back.    
    function receive_google(){
        $ec = new EasyContact();
        $contacts = $ec>google->getContacts();
        foreach($contacts as $contact){
            echo $contact['name'] . ":";
            echo $contact['address'];
            echo '<hr />';
        }
    }    

Change $this->google to $this->microsoft, Then you can get contact from them! That's all!

About

The fastest way to get users' email contact from Gmail and Microsoft Outlook.

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

Sponsor
SponsoredKunjungi sekarang
Promo