cocoa touch - iPhone meets Twitter implementation recieves NSURLErrorDomain error -


I have implemented MGTwitterEngine in my application and it works right next to it.

The first "weird" when I push the UIVIUutroler, the thing is happy where the Twitter form is, I get it in the console:

  This app was authorized for the first Twitter account so that you can press the second button now Tweet  

Should I hide the entry form or what your recommendation is?

The second "weird" thing that works is when I press the "Send Tweet" button and it works and the message has been posted on Twitter. But , I receive an error message in the method:

  - (zero) twitterXAuthConnectionDidFailWithError: (NSError *) error;  

and the error message is:

  error domain = NSURLErrorDomain code = -1012 "operation could not be completed (NSURLErrorDomain Error-1012.)" User Information = 0xde3edf0 {NSErrorFailingURLKey = https: //api.twitter.com/oauth/access_token, NSErrorFailingURLStringKey = https: //api.twitter.com/oauth/access_token, NSUnderlyingError = 0xde430c0 "The operation could not be completed (KCFErrorDomainCFNetwork Error -1012.) "}  

Which sounds strange to me, because the Twitter message is posted. But I get that error message anyway.

I have seen in the App Settings in the Twitter Control Panel.

Anyone familiar with this problem?

This type of delegation type I have implemented:

  #pragma mark XAuthTwitterEngineDelegate methods - (zero) storeCachedTwitterXAuthAccessTokenString: (NSString *) tokenString forUsername: ( NSString *) username {NSLog (@ "access token string returned:% @", token string); [[NSUserDefaults standard user default] Set object: tokenString forKey: kCachedXAuthAccessTokenStringKey]; // Send Color Button Enable [Loading Indicator Stop Animation]; Self.sendTweetButton.enabled = Yes; } - (NSString *) cachedTwitterXAuthAccessTokenStringForU Name: (NSString *) Username; {NSString * accessTokenString = [[NSUserDefaults standard user default] ObjectForekey: KCatchXAtToken string;]; NSLog (@ "about returning token string access:% @", accessTokenString); Return Access TokenString; } - (zero) twitterXAuthConnectionDidFailWithError: (NSError *) error; {Nslog (@ "error:% @", error); [Loading indicator stop animation]; Self.sendTweetButton.enabled = TRUE; } #pragma mark - #pragma mark MGTwitterEngineDelegate methods - (zero) requests enabled: (NSString *) connectionIdentifier {UIAlertView * alert = [[UIAlertView alloc] initWithTitle: @ "Sent!" Message: @ "Tweet sent!" Representative: cancel itselfTutton title: Zero other button title: @ "OK", zero]; [Alert Settag: 0]; [Alerts show]; [Warning issued]; [Loading indicator stop animation]; Self.sendTweetButton.enabled = TRUE; According to, NSURLErrorDomain-1012 is  NSURLErrorUserCancelledAuthentication :  

< / P>

was returned when an asynchronous request has been canceled for authentication by the user.

This is usually done by clicking on a "cancel" button in the user's name / password dialog.

Comments