开发者

Validate twitter username/password

开发者 https://www.devze.com 2023-03-01 12:10 出处:网络
Is there a method on the Twitter api for validating a user ? So I can send a username/password and I will receive a JSON response开发者_开发百科 detailing wether the username/password is valid or not.

Is there a method on the Twitter api for validating a user ? So I can send a username/password and I will receive a JSON response开发者_开发百科 detailing wether the username/password is valid or not.

Thanks


Twitter supports xAuth which takes a username and password and returns an access token for the user.

However xAuth requires approval from Twitter before your application can use it and they generally only allow it for mobile and desktop accounts. Twitter will also enable it temporarily if you have a legacy BasicAuth app you need to convert to OAuth.

If you decide to go with xAuth keep in mind that you should never store users passwords. Once the authorization is complete immediately discard them.


You can validate using oAuth. you can find various opensource codes for the same. Twitter removed Basic authentication in since Aug 2010

You can take a look here http://apiwiki.twitter.com/w/page/22554657/OAuth-Examples

Hope that helps

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号