Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Twitter-web #32

Closed
zackbraksa opened this issue Jan 30, 2014 · 6 comments
Closed

Twitter-web #32

zackbraksa opened this issue Jan 30, 2014 · 6 comments

Comments

@zackbraksa
Copy link

While trying to use Twitter-web, with the following code :

[SimpleAuth authorize:@"twitter-web" completion:^(id responseObject, NSError *error) {
        NSLog(@"%@", responseObject);
        NSLog(@"%@", error);
    }];

I get the following error (and the UIWebView doesn't show up):

Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn’t be completed. (NSURLErrorDomain error -1012.)" UserInfo=0xa972a80 {NSErrorFailingURLKey=https://api.twitter.com/oauth/request_token, NSErrorFailingURLStringKey=https://api.twitter.com/oauth/request_token, NSUnderlyingError=0xfc79580 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1012.)"}

Even if I made sure to setup the consumer key and the consumer secret !

@calebd
Copy link
Owner

calebd commented Jan 30, 2014

Interesting. The URL loading system returns that error if you get a 401 during authentication. I'll look into it and let you know what I find.

@calebd
Copy link
Owner

calebd commented Jan 30, 2014

Hm. I am unable to reproduce. Be sure you configured the provider like this:

SimpleAuth.configuration[@"twitter-web"] = @{
    @"consumer_key" : @"KEY",
    @"consumer_secret" : @"SECRET"
};

And also make sure the app is properly configured on the Twitter developer site. It's possible that an improper configuration there would result in unauthorized responses.

@zackbraksa
Copy link
Author

Yeah I did configure the provider ! But I will definitely check the app configuration on the twitter developer site !

Thanks for your quick response Sir !

@ryohey
Copy link

ryohey commented Jul 1, 2014

@josephyzhou same here, but I changed the app config and works perfectly.
I checked Allow this application to be used to Sign in with Twitter
and set Callback URL to http://example.com/

@davidchang
Copy link

for future reference, +1 ryohey's correspondence. Setting the Callback URL fixed the issue for me.

The description on that field on Twitter's app management dashboard says, "To restrict your application from using callbacks, leave this field blank."

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@zackbraksa @davidchang @calebd @ryohey and others