简体   繁体   English

如何在我的iPhone应用程序中从Twitter BasicAuth升级到Oauth

[英]How to upgrade from Twitter BasicAuth to Oauth in my iPhone Application

I have struck with posting my application to apple because of following reason. 由于以下原因,我已经将我的应用程序发布到苹果了。

Application is not posting tweets to twitter. 应用程序不会向Twitter发布推文。 I have implemmented twitter with basic Auth. 我用基本的Auth实现了twitter。 so that it is not working from August 31, 2010. 所以它从2010年8月31日起不起作用。

So can any one help me 所以任何人都可以帮助我

How to upgrade from Twitter BasicAuth to Oauth in my iPhone Application. 如何在我的iPhone应用程序中从Twitter BasicAuth升级到Oauth。

Another question is: 另一个问题是:

This (Oauth) should not change the UI of my application. 这个(Oauth)不应该改变我的应用程序的UI。 means when user clicks on twitter button it should ask user name and password every time, and if we click on send button it should send tweets to twitter. 意味着当用户点击Twitter按钮时,它应该每次都询问用户名和密码,如果我们点击发送按钮,它应该发送推文到twitter。

i implemented the Oauth but it is asking the username and password one time. 我实现了Oauth,但它一次询问用户名和密码。

I suggest you check out MGTwitterEngine on GitHub. 我建议你在GitHub上查看MGTwitterEngine This library wraps up the Twitter API nicely and does the OAuth stuff as well. 这个库很好地包装了Twitter API并且也做了OAuth的东西。

You don't need to ask you user for their username and password every time. 您不必每次都要求用户输入用户名和密码。 You can get their credentials initially and then store the access token you get back from Twitter (or from MGTwitterEngine if you choose to use that library) and use that for next time. 您最初可以获取其凭据,然后存储您从Twitter(或者如果您选择使用该库)从MGTwitterEngine获取的访问令牌,并在下次使用它。

MGTwitterEngine wraps up the access token with an OAToken object which does the persistence for you. MGTwitterEngine使用OAToken对象包装访问令牌,该对象为您执行持久性。

http://code.google.com/p/gtm-oauth/是适用于iOS和Mac OS X的简易OAuth实施

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

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