检查的Twitter用户名存在 [英] Check if twitter username exists

查看:322
本文介绍了检查的Twitter用户名存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来检查,如果Twitter用户名的存在?
如果没有使用OAuth和Twitter的基本身份验证被验证?

Is there a way to check if a twitter username exists? Without being authenticated with OAuth or the twitter basic authentication?

推荐答案

根据API文档,你可以通过电子邮件地址给用户/
show方法,我会假设,如果用户不存在你会回来
404,它应该让你确定是否用户
存在。

According to the api docs you can pass an email address to the user/ show method, I would assume that if a user didn't exist you'd get back a 404, which should allow you to determine whether or not the user exists.

例如: http://twitter.com/users /show.xml?email=t...@example.com

的结果,如果不存在的:

result if not exist :

<?xml version="1.0" encoding="UTF-8"?> 
<hash> 
  <request>/users/show.xml?email=tur...@example.com</request> 
  <error>Not found</error> 
</hash

这篇关于检查的Twitter用户名存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆