How to test Google Plus account existance

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 12:51:40

问题


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:

  1. save ID as string (for example id="mohsensolhnia" or 21 digit number)
  2. redirect to "http://plus.googleapis.com/wm/4/+"+id+"/posts"
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!