Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SA_OAuthTwitterEngine Twitter authentication on iOS 5 (error -1012)

I'm using SA_OAuthTwitterEngine and it works fine for some accounts. But, gives (NSURLErrorDomain error -1012.) for some twitter accounts.

It seems to work fine on ios 4. But not on iOS 5. anyone notices this problem?

Any hints?

Thanks

like image 345
moeseth Avatar asked Oct 22 '11 19:10

moeseth


2 Answers

Yes... Change http to https in the initOAuthWithDelegate method inside SA_OauthTwitterEngine.m and this should fix the problem - like so:

self.requestTokenURL = [NSURL URLWithString: @"https://twitter.com/oauth/request_token"];
self.accessTokenURL = [NSURL URLWithString: @"https://twitter.com/oauth/access_token"];
self.authorizeURL = [NSURL URLWithString: @"https://twitter.com/oauth/authorize"];
like image 55
NSDestr0yer Avatar answered Oct 16 '22 16:10

NSDestr0yer


try find&replace http://twitter.com/oauth/ with https://twitter.com/oauth/ 3x

like image 34
Christian Loncle Avatar answered Oct 16 '22 16:10

Christian Loncle