> Yes, a...@twitter.com granted my app for xAuth... > Any suggestion on what I should do to fix the issue? > I did all I can and I'm STUCK at the point.
A little easy googling (for "NSURLErrorDomain error 1012") turned up http://stackoverflow.com/questions/501231/can-i-use-nsurlcredentialstorage-for-http-basic-authentication, which might be helpful for you. Also, again, some very easy searching in the Xcode docs yields NSURLErrorDomain error -1012 as: NSURLErrorUserCancelledAuthentication Returned when an asynchronous request for authentication is cancelled by the user. This is typically incurred by clicking a “Cancel” button in a username/password dialog, rather than the user making an attempt to authenticate. So it looks like you're getting an auth request in the http response and you're not handling it correctly / at all. So either the auth request is incorrect -- in which case you should probably post the full http request and response to this list -- or you need to handle it. (If you don't know how to handle it, and you can't figure it out from the docs, it's probably a question better suited for an iPhone dev list.) -josh > On Apr 20, 1:27 pm, Taylor Singletary <taylorsinglet...@twitter.com> > wrote: >> Hi Sae, >> >> Have you received approval for using xAuth in your application yet by >> emailing a...@twitter.com ? I'm not familiar enough with Objective-C to >> understand the error, but your signature base string and authorization >> header look otherwise correct on first glance. >> >> Taylor Singletary >> Developer Advocate, Twitterhttp://twitter.com/episod >> >> >> >> On Tue, Apr 20, 2010 at 1:13 PM, sae <twitp...@gmail.com> wrote: >> > Hi, >> > I just set up my application for xauth and started testing. >> > It keeps failing with error message: >> >> > Error Domain=NSURLErrorDomain Code=-1012 UserInfo=0x268d70 "Operation >> > could not be completed. (NSURLErrorDomain error -1012.) >> >> > What is this error? Is anything wrong with my app setting, or my >> > parameter may not be correct? >> > Any clue will be really appreciated... >> >> > Here is the copy of signature-base-string and authorization header, >> > which all look ok to me: >> >> > POST&https%3A%2F%2Fapi.twitter.com%2Foauth >> > %2Faccess_token&oauth_consumer_key%3Dxxxxxxxxxxxxxx%26oauth_nonce >> > %3D684B1D0C-4276-47BD-9A43-C31FDDD0DD8A%26oauth_signature_method >> > %3DHMAC-SHA1%26oauth_timestamp%3D1271708678%26oauth_version >> > %3D1.0%26x_auth_mode%3Dclient_auth%26x_auth_password%3Dxxxxxx >> > %26x_auth_username%3Dyyyyy >> >> > OAuth realm=\"\", >> > oauth_consumer_key=\"xxxxxxxxxxxxxxxx\", >> > oauth_signature_method=\"HMAC-SHA1\", >> > oauth_signature=\"rg5s%2BW8wMxSx5MJt0wV3idqjriI%3D\", >> > oauth_timestamp=\"1271708678\", >> > oauth_nonce=\"684B1D0C-4276-47BD-9A43-C31FDDD0DD8A\", >> > oauth_version=\"1.0\"; >> >> > -- >> > Subscription settings: >> >http://groups.google.com/group/twitter-development-talk/subscribe?hl=en >