http authenitcation in xcode
Posted
by user313100
on Stack Overflow
See other posts from Stack Overflow
or by user313100
Published on 2010-05-04T14:04:57Z
Indexed on
2010/05/04
14:08 UTC
Read the original article
Hit count: 240
I am trying to make twitter work in my app and everything works fine except the code does not seem to recognize an error from twitter. If the username/password are not valid, I get an error message through this function:
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
NSString* strData = [[[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding:NSASCIIStringEncoding] autorelease];
NSLog(@"Received data: %@", strData ) ;
return ;
}
It prints: Received data: Could not authenticate you. .
However, the app continues to the post a tweet view I have and ignores the error. Obviously, I do not have something setup right to detect such an error from twitter so my question is how do I get xcode to recognize an error like this? This uses basic http auth btw and don't mention anything about OAuth...just trying to get this to work for now.
© Stack Overflow or respective owner