2010-04-27 157 views

回答

0

根據API文檔,你可以通過一個電子郵件地址,用戶/ 表演方法,我會假設,如果用戶不存在,那你將獲得 404 ,這應該允許您確定用戶是否存在 。

如:http://twitter.com/users/[email protected]

的結果,如果不存在:

<?xml version="1.0" encoding="UTF-8"?> 
<hash> 
    <request>/users/[email protected]</request> 
    <error>Not found</error> 
</hash 
3

在新的Twitter的API email參數已被棄用。

下面是一些可以使用來代替:http://api.twitter.com/1/users/show/username.xml

更換用戶名與實際的用戶名。如果用戶不在場,您將收到一條錯誤消息:

<?xml version="1.0" encoding="UTF-8"?> 
<hash> 
    <error>Not found</error> 
    <request>/1/users/show/asdfsadfasdfasdf.xml</request> 
</hash> 
相關問題