Reputation: 1541
I'm using Google App Engine with a Google Account authentication. I have a list of Google e-mails, which have been used for authentication on my page. How can I get the user nickname/name for each of the e-mails? I can get it for current logged user by using User object, but I didn't find this option in Java for regular Google e-mail.
Python implementation has this functionality: users.User(email)
Upvotes: 3
Views: 209
Reputation: 35783
Take a look at the documentation. There's a constructor for making a User object from an email address and authorization domain, from which you can get the nickname.
Take a look at @Andrei's answer bellow for an example (I actually don't code Java :) ).
Upvotes: 2
Reputation: 41089
User user = new User(userEmail, "gmail.com");
String nickName = user.getNickName();
Upvotes: 2