【问题标题】:Has anyone successfully used MPOAuth on iPhone to connect with twitter?有没有人在 iPhone 上成功使用 MPOAuth 连接 twitter?
【发布时间】:2011-12-23 06:11:38
【问题描述】:

我的项目构建良好,但是当它粘贴到下面的行时,它会崩溃并显示以下消息。

代码:

oauthAPI = [[MPOAuthAPI alloc] initWithCredentials:credentials
        authenticationURL:[NSURL URLWithString:@"https://twitter.com/oauth/"]
         andBaseURL:[NSURL URLWithString:@"https://twitter.com/"]];

错误:

断言失败 -[MPOAuthAuthenticationMethodOAuth initWithAPI:forURL:withConfiguration:], /Project/MPOAuth/MPOAuthAuthenticationMethodOAuth.m:49

由于未捕获而终止应用 例外 'NSInternalInconsistencyException', 原因:'不正确的oauth数 授权方法'

【问题讨论】:

  • AFAIK - 您必须对 api.twitter.com 进行身份验证和其他 api 请求,而不是直接对 twitter.com 进行。不过可能是错的。

标签: iphone objective-c oauth


【解决方案1】:

twitter 现在使用 OAuth 作为身份验证机制。您将不得不更改您的 oauthAutoConfig.plist

twitter 的条目应该是这样的

【讨论】:

    猜你喜欢
    • 2010-11-25
    • 1970-01-01
    • 1970-01-01
    • 2013-04-21
    • 2018-05-12
    • 2011-01-21
    • 1970-01-01
    • 2014-04-15
    • 1970-01-01
    相关资源
    最近更新 更多