Can't login via Twitter Kit for iOS


Edit: As usually with these things, once I press post I find a solution a few moments later…
Apparently it is possible to get the stored twitter account into a state where it has no password and twitter kit does not like that.

I work on implementing sharing to twitter and as a first step I integrated Twitter Kit using the Fabric app which eventually was happy with what I did.
The plist correctly includes the API Key and Token setup on the Fabric page (I also tried different ones for an application created on the twitter devloper application site).
Now whenever I try to login using the following code:

[[Twitter sharedInstance] logInWithCompletion:^(TWTRSession *session, NSError *error){
		NSLog(@"signed in as %@", [session userName]);
		DDLogWarn(@"Twitter login: %@", [error localizedDescription]);
		DDLogWarn(@"Twitter access denied or no account [%@,%@,%@]",[error localizedDescription],[error localizedFailureReason],[error userInfo]);

I am getting the following error in the callback (nearly immediately, without anything visible happening in the app):

e[fg204,121,32;2015-10-06 17:49:01:537 VeroShareManager[setupTwitter: line 150] Twitter login: The operation couldn’t be completed. (NSURLErrorDomain error -1012.)
e[;e[fg204,121,32;2015-10-06 17:49:01:539 VeroShareManager[setupTwitter: line 151] Twitter access denied or no account [The operation couldn’t be completed. (NSURLErrorDomain error -1012.),(null),{
NSErrorFailingURLKey = “”;
NSErrorFailingURLStringKey = “”;
NSUnderlyingError = “Error Domain=kCFErrorDomainCFNetwork Code=-1012 “(null)” UserInfo={_kCFURLErrorAuthFailedResponseKey=<CFURLResponse 0x13f7783a0 [0x1a11f4b68]>{url =}}”;

I suspect that something in my app is blocking whatever is supposed to happen, but I have no idea on what should happen (open the twitter app, browser or just some some view controller? Is there a user selection if the user has several accounts?) and what could block it…

Any help and or ideas would be great!


Hey @Slin, I’m having this issue too. The Twitter folks are looking into it. See this other thread.

closed #3