简体   繁体   English

Windows Phone 8应用中的Twitter Oauth

[英]Twitter Oauth in windows phone 8 app

I need to use Twitter Oauth to login my windows phone app, 我需要使用Twitter Oauth登录Windows Phone应用,

What i need exactly is 我确切需要的是

1)when the user click twitter log in button from my app, i need to show the twitter llog in page in a browser, 2)when he enters his credentials and accept the app, then i should get the user information like, name, gender, bday, what ever i can take. 1)当用户点击我的应用程序中的twitter登录按钮时,我需要在浏览器中显示twitter llog登录页面,2)当他输入凭据并接受该应用程序时,则我应该获取用户信息,例如姓名,性别,生日,我可以接受的一切。

That,s it, then i can close the browser and make my app active. 就是这样,然后我可以关闭浏览器并使我的应用程序处于活动状态。

I just need to make the user to log in via twitter. 我只需要让用户通过Twitter登录即可。

I referred lot of examples, that are all quit confusing and doing all the stuffs in twiiter. 我提到了很多例子,这些例子都变得混乱不堪,并且花了很多时间做所有的事情。

I tried this example 我试过这个例子

and got this error 并得到这个错误

'TweetSharp.TwitterService' does not contain a definition fError    2   'TweetSharp.TwitterService' does not contain a definition for 'GetAccessToken' and no extension method 'GetAccessToken' accepting a first argument of type 'TweetSharp.TwitterService' could be found (are you missing a using directive or an assembly reference?)

and i tried enter link description here 我试图在这里输入链接描述

failed on that too. 也失败了。

Can anybody help me to do the authentication via twitter for my app. 谁能帮助我通过Twitter进行我的应用程序的身份验证。 Thank you. 谢谢。

I tried this example and got success, I contacted the person who have posted that example and got help from him to solve the issues raised from this example. 我尝试了此示例并获得了成功,我联系了发布该示例的人,并从他那里得到了帮助,以解决此示例中提出的问题。

Actually this Example works fine for twitter integration, 实际上,此示例可用于Twitter集成,

What you have to do is 你要做的是

1)Register your app in twitter, here the link for app registration , 1)在Twitter上注册您的应用程序,此处为应用程序注册链接

log in and register your app. 登录并注册您的应用。

2)Make sure you have given the Call Back URL(i forget to give that, and that makes me face lot of issues) 2)确保您提供了回叫网址(我忘了给它了,这让我面临很多问题)

3)Note down the Consumer Key, Consumer Secret and Call back url(we need specify this 3 in our code) 3)记下消费者密钥,消费者秘密和回叫网址(我们需要在代码中指定此3)

4)Go to Settings, and set your app access to Read and Write 4)转到“设置”,然后将您的应用访问权限设置为“读写”

5)down load the above link and change the Consumer Key, Consumer Secret and Call back url as per your app, and then run the example, it will work fine. 5)下载上述链接,并根据您的应用程序更改“消费者密钥”,“消费者秘密”和“回叫网址”,然后运行示例,它将正常工作。

Thank you. 谢谢。

If you just want to authenticate using Twitter and don't want to post anything, perhaps you can try Azure Mobile Service Authentication. 如果您只想使用Twitter进行身份验证并且不希望发布任何内容,则可以尝试Azure移动服务身份验证。 You can find more information here: mobile services authentication 您可以在此处找到更多信息: 移动服务认证

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM