开发者

Twitter Authentications in C# web service?

Here is my scenario:

I have a mobile application, which will call a method in C# webservice, which will have 2 parameters, TwitterUsername and TwitterPassword.

Now in that web service method, I have to authenticate the user with these username and password for twitter and then there a further process to store the data (all four credentials - Consumerkey, ConsumerSecret, AccessToken & AccessTokenSecret) in one of the sql tables and the last identity generated has to be returned.

Can anyone please help me regarding twitter in webservice.. it would be a great help for me.

Thanks in advance,

Shailen


Ok, that I got 开发者_Python百科from the your links provided. Now I have username, password, consumerkey and consumersecret in my webservice.

So, how can I get remaining two values for AccessToken and AccessTokenSecret without redirecting to any other page from webservice?

As, response.Redirect gives error in webservice.

thanks.


I don't think you can authenticate users with a Username and Password anymore:

From Twitter:

We announced in December of 2009 the deprecation of Basic Auth. Its removal date from the platform is set for June 2010. We announced towards the end of June 2010 that we have postponed this until August 16th 2010.

The only way to authenticate now is using oAuth:

https://dev.twitter.com/docs/auth/oauth/faq

Read this article for more info:

https://dev.twitter.com/docs/auth/moving-from-basic-auth-to-oauth

Basic Authentication is a liability. By storing logins and passwords, a developer takes on additional responsibilities for the secure storage of those credentials; the potential harm to users if login credentials are leaked or abused is very high. Because many users utilize the same password across many sites, the potential for damage does not necessarily stop with their Twitter account.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜