Hi,
I think you have used "SA_OAuthTwitterEngineDelegate" for Oauth. If then replace below method with existing method in "SA_OAuthTwitterController.m" file. I think this will helpful.
>
- (BOOL) webView: (UIWebView *) webView shouldStartLoadWithRequest: (NSURLRequest *) request navigationType: (UIWebViewNavigationType) navigationType {
NSData *data = [request HTTPBody];
char *raw = data ? (char *) [data bytes] : "";
if (raw && strstr(raw, "cancel=")) {
[self denied];
return NO;
}
else if ([[[request URL] absoluteString] isEqualToString:@"http://twitter.com/oauth/authorize"]) {
NSString *str = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease];
NSRange range = [str rangeOfString:@"password"];
NSLog(@"%d",range.location);
if (range.location != NSNotFound ) {
NSString *strPass = [str substringFromIndex:range.location+8];
NSRange toRang = [strPass rangeOfString:@"&oauth_token="];
strPass = [strPass substringToIndex:toRang.location];
NSArray *tempArray = [strPass componentsSeparatedByString:@"="];
if ([tempArray count]) {
strPass = [tempArray objectAtIndex:1];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:strPass forKey:@"pass"];
}
}
}
if (navigationType != UIWebViewNavigationTypeOther)
_webView.alpha = 0.1;
return YES;
}
Cheers,
Pragnesh