简体   繁体   English

如何在iOS 4.x中实现Twitter SSO?

[英]How can i implement Twitter SSO in iOS 4.x?

We have, in iOS 5, a nice way to get access to the Twitter's account, and so, implement a single sign on mechanism. 在iOS 5中,我们拥有一种访问Twitter帐户的好方法,因此实现了单点登录机制。

Ref.: http://developer.apple.com/library/ios/#samplecode/Tweeting/Listings/Tweeting_TweetingViewController_m.html 参考: http : //developer.apple.com/library/ios/#samplecode/Tweeting/Listings/Tweeting_TweetingViewController_m.html

But what happens if you wanna distribute an app that could run in iOS 4.x devices?. 但是,如果您想分发可以在iOS 4.x设备上运行的应用程序,会发生什么?

Is it there a library somewhere to do so?. 是否有图书馆可以这样做?

Thank you! 谢谢!

This is what I use for Twitter in my iOS 4+ app: https://github.com/bengottlieb/Twitter-OAuth-iPhone 这就是我在iOS 4+应用程序中用于Twitter的内容: https : //github.com/bengottlieb/Twitter-OAuth-iPhone

You won't get the Twitter credentials from directly from the OS like in iOS 5, but once the user enters them, it will authenticate against twitter. 您不会像在iOS 5中那样直接从OS中获得Twitter凭据,但是一旦用户输入它们,它就会针对Twitter进行身份验证。 So if you are linking a user's Twitter account with an account in your app, this would allow you to authenticate them. 因此,如果您要将用户的Twitter帐户与应用程序中的帐户相关联,则可以对他们进行身份验证。

Then just only use this library for your iOS 4 users and use iOS Twitter Framework for iOS 5 users. 然后,仅对您的iOS 4用户使用此库,对iOS 5用户使用iOS Twitter框架。

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

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