I have a user and a password and I’d like to use Twitter API (I’m using python-twitter) to check if those are valid data.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you grab the 0.7 version of python-twitter, a VerifyCredentials method has been added. If the returned value is
Nonethen the username/password combo was incorrect.I liked using
api.GetUser(username)first to check if they provided a valid username and then usingapi.VerifyCredentials()to check the password — this way I could informed the user which part of their login was incorrect.As others have mentioned, Twitter is pushing for OAuth logins only and are expected to deprecate the existing username/passwd login method.