问题
I am building a website where a user could specify his social accounts links, I am trying to find a way to test if a google plus account actually exists (social account validation).
I've seen that it is actually possible to test using the GET people/userId but what about curtom urls ? For example if a user has a google.com/+JohnDoe , how would you figure it out? I didn't find anything in the google docs.
回答1:
It's the same API. GET people/userId
and GET people/+JohnDoe
both work.
回答2:
i think google never publish users info or google's huge database, because spammers are searching very hard to that API (for advertising,....) but you can implement this algorithm:
- save ID as string (for example id="mohsensolhnia" or 21 digit number)
- redirect to "http://plus.googleapis.com/wm/4/+"+id+"/posts"
- if link was wrong you will redirect to "error 404 page"(google page not found) (title is "Error 404 (Not Found)!!1" ;D ;D )
you can do above 3 step with C#/java/phyton/... "selenium webdriver" dll very easy.
来源:https://stackoverflow.com/questions/25089877/how-to-test-google-plus-account-existance