Is there a way to check if a twitter username exists? Without being authenticated with OAuth or the twitter basic authentication?
相关问题
- java client program to send digest authentication
- PHP persistent login - Do i reissue a cookie after
- Rails how to handle error and exceptions in model
- How to handle “App is temporarily blocked from log
- Script fails on SpreadsheetApp.openById - Requires
相关文章
- is there a callback option with twitter's “fol
- User.Identity.IsAuthenticated vs WebSecurity.IsAut
- SwiftUI - Vertical Centering Content inside Scroll
- Override UserManager in django
- Proper WWW-Authenticate header for OAuth provider
- Your application has authenticated using end user
- Twitter name length in DB
- Twitter oauth refresh token
As API v1 is no longer available, here is another way to check if a twitter account exists. The page headers of a non existing account contain 404 (page not found).
This worked for me, close to what sferik has posted.
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.
eg: http://twitter.com/users/show.xml?email=t...@example.com
result if not exist :
You can also use the API with username :
eg : http://api.twitter.com/1/users/show.xml?screen_name=tarnfeld
Will give you :
Or if not exist :
Using Ruby, you could install the twitter gem and then define the following method:
Then, simply pass in a Twitter user name or id to your method, like so:
Here is how it works on PHP :