【问题标题】:How to implement Twitter+OAuth third party如何实现 Twitter+OAuth 第三方
【发布时间】:2015-02-17 21:23:23
【问题描述】:

我一直在测试使用 Twitter+OAuth 第三方登录来实现 Twitter 登录,下载地址:https://github.com/bengottlieb/Twitter-OAuth-iPhone/tree/master/Twitter%2BOAuth

这个sn-p是为了实例化SA_OAuthTwitterEngine。

SA_OAuthTwitterEngine *engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate: self];

但是,如果这个实例化是在 NSObject 的子类中实现的(不在 UIViewController 内:因为 Twitter+OAuth 中的演示打算在 UIViewController "viewWillAppear" 内实例化),您将根本无法实例化。

*engine 和 self 将为零,在这种情况下这是不正确的行为。 综上所述,我要做的是在 NSObject 的子类中使用这个第三方实现 Twitter 登录。

请帮助我尽快解决这个问题。

干杯,

【问题讨论】:

    标签: objective-c twitter instantiation


    【解决方案1】:

    您不应该将 Twitter+OAuth 用于新项目;自 iOS 5 起,iOS 已包含内置的 Twitter 支持;这就是应该使用的。

    【讨论】:

    • 谢谢本。我从我的大学接手了一个项目,该项目一直在使用你的第三方。这就是我尝试使用它的原因。好的,我去看看!
    猜你喜欢
    • 2016-04-18
    • 1970-01-01
    • 2012-08-12
    • 1970-01-01
    • 2015-05-26
    • 2020-10-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多