samedi 11 mars 2017

Fetch contacts email address in Laravel

I am learning how to view gmail contacts and following this tutorial. http://ift.tt/2mvimcZ

As per the article below code fetches the contacts.

Url = 'http://ift.tt/2mwNjzb';
$result = json_decode($googleService->request(Url), true);
$emails = []; // initialize the new array
foreach ($result['feed']['entry'] as $contact) {
    if (isset($contact['gd$email'])) { // Sometimes, a contact doesn't have email address
        $emails[] = $contact['gd$email'][0]['address'];
    }
}

Here the problem is, it shows me even those email addresses to whom I sent emails. is there url that picks only contacts?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire