After I get successful authentication, I've already got user information by below method.
// 1. Create a |GTLQuery| object to get people profile who are authenticated
GTLQueryPlus *query = [GTLQueryPlus queryForPeopleGetWithUserId:@"me"];
// 2. Execute the query.
[[[GPPSignIn sharedInstance] plusService] executeQuery:query completionHandler:^(GTLServiceTicket *ticket,GTLPlusPerson *gpUser,NSError *error) {
// here I've retrieved all info about users
NSLog(@"GP user first name : %@",gpUser.name.givenName);
NSLog(@"GP user last name : %@",gpUser.name.familyName);
//But don't know how extract phone number.
}];
This google doc shows how to retrieve info via google api. But couldn't see how to extract phone number if user make it visible as public? Is it possible with google plus api?
The Phone Number Hint API, a library powered by Google Play services, provides a frictionless way to show a user's (SIM-based) phone numbers as a hint. The benefits to using Phone Number Hint include the following: No additional permission requests are needed.
Google does not offer access to this data using their G+ API, even though the user marked the information as "public".
See this other thread from 2012 where it's clearly stated that phone numbers are not available through G+ API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With