简体   繁体   中英

How to access user ZIP code with Google+ SDK

我无法在文档中找到它,但是如果他们使用Android上的Google+帐户登录,是否可以访问用户邮政编码?

Not really. Certainly not consistently.

There are several reasons why not:

  1. You can only access public information from a user's profile, even with their permission. So all bets are off if they haven't made this public in the first place.

  2. Users can set a current "places lived" in their profile, but this is a free-form entry and doesn't require it to be validated in any way against a known places database. It also has the person enter a city, not a ZIP code, so you would need to convert it.

  3. They can also set contact information for home or work, and address is one such field they can enter, but this is also a free-form entry, so you would have to search such entries (if they are set) for something that resembles a ZIP (which isn't difficult, but you need to be careful).

  4. The person may not have a US address, and thus not a ZIP code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM