How to get Email of friend using google+ api?

后端 未结 3 1000
旧巷少年郎
旧巷少年郎 2021-01-26 04:49

Im creating an application to login in Google+ and get friends emails. Im authenticating succesfully and get token back , but when i fetch friends list , the user class of any s

3条回答
  •  面向向阳花
    2021-01-26 04:54

    The Google+ API only returns public information. So even if you are permitted to see a person's email address, it does not necessarily mean that the information is public and that it will be returned.

    Furthermore, the documentation at https://developers.google.com/+/api/latest/people/list only guarantees that the list of people returned will contain the person's

    • id
    • displayName
    • image
    • url

    and that to get other information about the person, you will need to do a people.get against that ID. But, again, note that you may still not get their email if that information isn't public.

提交回复
热议问题