【发布时间】:2011-12-31 21:59:00
【问题描述】:
以前,MGTwitterEngine 对我来说工作得很好,但现在每次我登录时,我都会从 OAuth 获得一个无效的 url 异常。我以为是因为我改变了一些东西,但是当我尝试从 iphone 模拟器登录时,它起作用了(我正在从我的 iphone 尝试)。然后我尝试了 3 天前我的项目的旧副本,当时我完全没有问题,现在我得到了相同的 url 错误。有人遇到过吗?
为了暂时解决这个问题,我进入了 SA_OauthTwitterEngine.m 并做了
- (SA_OAuthTwitterEngine *) initOAuthWithDelegate: (NSObject *) delegate {
if (self = (id) [super initWithDelegate: delegate]) {
self.requestTokenURL = [NSURL URLWithString: @"http://twitter.com/oauth/request_token"];
//self.accessTokenURL = [NSURL URLWithString: @"http://twitter.com/oauth/access_token"];
self.accessTokenURL = [NSURL URLWithString: @"https://api.twitter.com/oauth/access_token"];
self.authorizeURL = [NSURL URLWithString: @"http://twitter.com/oauth/authorize"];
}
return self;
}
http://twitter.com/oauth/access_token url 存在问题,因此我将其更改为 https://api.twitter.com/oauth/access_token,它在 twitter API 的文档中。不得不改变它只是感觉不舒服,因为它似乎对其他人都很好。
感谢任何帮助
【问题讨论】:
标签: iphone twitter mgtwitterengine