0

I'm creating an application with google identification.

I need to identify the google accounts of my friends from people API from "people/me"

Here my code:

  GoogleCredential credential = new GoogleCredential.Builder()
            .setTransport(httpTransport)
            .setJsonFactory(jsonFactory)
            .setClientSecrets(clientId, clientSecret)
            .build()
            .setFromTokenResponse(tokenResponse);

    People peopleService = new People.Builder(httpTransport, jsonFactory, credential)
            .build();

    ListConnectionsResponse response = peopleService.people().connections()
            .list("people/me")

The issue: I don't know how to identify the google accounts founded. Explanation: i want find the google accounts and use a "id" to send a notification when this one is connected on my app.

Can you help me ?

yrros
  • 43
  • 5

1 Answers1

0

Try to add .setRequestMaskIncludeField("person.names,person.emailAddresses,person.phoneNumbers") .execute();

to response object. Because by default selection of filed for user profile is empty, so you should specify fields to select

Alex
  • 130
  • 11