Twitter API - STTwitter library: Unhandled authentication challenge type - NSURLAuthenticationMethodOAuth2

StackOverflow https://stackoverflow.com/questions/17646230

Question

The method I'm using is:

[STTwitterAPIWrapper twitterAPIWithOAuthConsumerName:@"<Value>" consumerKey:@"<Value>" consumerSecret:@"<Value>" username:@"<Value>" password:@"<Value>"];

When I'm using the example given:

consumerName:'TweetDeck',
consumerKey:'yT577ApRtZw51q4NPMPPOQ'

as parameters, it works and returns Twitter results. When I'm using my own app's consumerName, consumerKey and consumerSecret it returns the error below.

The error log is:

Unhandled authentication challenge type - NSURLAuthenticationMethodOAuth2
-- Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn’t be completed. (NSURLErrorDomain error -1012.)" UserInfo=0xa6d4fb0 {NSErrorFailingURLKey=https://api.twitter.com/oauth/access_token, NSErrorFailingURLStringKey=https://api.twitter.com/oauth/access_token}

Something wrong here?

Was it helpful?

Solution

As explained in the README, your consumer tokens are probably not xAuth-enabled. You can read more on this on Twitter website and ask Twitter to enable the xAuth authentication process for your consumer tokens.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top