I have been fighting this for some time, and not able to narrow down the problem. I am using parse twitter integration, but get the following error (I have already checked all the topics regarding the following error message):
Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn’t be completed. (NSURLErrorDomain error -1012.)" UserInfo=0x98ead30 {NSErrorFailingURLKey=https://api.twitter.com/oauth/request_token, NSErrorFailingURLStringKey=https://api.twitter.com/oauth/request_token, NSUnderlyingError=0x98cd1c0 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1012.)"}
I have specified a callback url for my app in the twitter settings, and set read & write permission for the application (checked the allow twitter sign in option as well). I have tested the https://api.twitter.com/oauth/request_token from the simulator and can open it (taught it is a network issue at first). I am testing parse and this is a bit of show stopper for me. Here is my code:
in didFinishWithOptions:
[PFTwitterUtils initializeWithConsumerKey:@"appkey" consumerSecret:@"appsecret"];
and my twitter button action:
[PFTwitterUtils logInWithBlock:^(PFUser *user, NSError *error) {
NSLog(@"%@",error);
if (!user) {
NSLog(@"%@", user); NSLog(@"Uh oh. The user cancelled the Twitter login."); return;} else if (user.isNew) {
NSLog(@"User signed up and logged in with Twitter!");} else {
NSLog(@"User logged in with Twitter!");}
}];
I am using the latest version of the SDK. Does anyone have any idea what might be the problem?
Thank you in advance!