Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to get phone number with Google plus API

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?

like image 629
Mani Avatar asked Mar 04 '14 10:03

Mani


People also ask

What is a phone hint?

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.


1 Answers

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.

like image 117
Romain Avatar answered Nov 16 '22 03:11

Romain