问题
I am planning an application where the owners of a business can register his place. I would like to use Google Places API for fetch the information of the business. That way, when a new user registers in the app, he provides an ID of his place, and the app retrieves the information from the API. I am going to need some way to validate that the user that is registering is the actual owner of the business. Is that possible? Does anybody have any idea how to achieve this?
I've been thinking that if I could retrieve the email of the person who registered the place in google places (the actual owner), then I could send an email to this address for validation, but I can't find in the documentation any way to get that.
Thanks!
回答1:
Looks like this is possible now. The workflow would be the following:
- Your user triggers a places search and selects a specific place in the result
- Your user selects an option in your app to claim they are the owner of your place
- Your user is redirected into an OAuth flow to Google Places where they login with their Google credentials
- Once authenticated, your app is provided with an OAuth token for the user
- Your app submits that token along with a Place reference to a Places API owner verification service
- The Places API returns a yes/no as to whether the user concerned is the verified owner of the Place
Source - https://code.google.com/p/gmaps-api-issues/issues/detail?id=3894 - comment #3
Enjoy!
回答2:
I don't believe there is a way to achieve this. But you could cross-reference the information they give you with the information from google places.
Google verifies ownership by sending them a pin either by calling the business phone number or sending them a postcard in the mail. https://support.google.com/places/answer/177852?hl=en
Apple verifies businesses by using a D-U-N-S number, you may be able to figure out something with that. http://www.dnb.com/get-a-duns-number.html
来源:https://stackoverflow.com/questions/19817407/validate-place-owner-google-places-api