I use the Twitter-OAuth-iPhone to authorise and send tweets, and want to show the user's twitter username on the dialog view. Although the code can get the username right, but there is always a warning:
*'SA_OAuthTwitterEngine' may not respond to '-extractUsernameFromHTTPBody:' (Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.)*
The code I use to get the Twitter username are:
_engine=[[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self];
...
NSString *cachedData=[[NSUserDefaults standardUserDefaults] objectForKey:@"authData"];
NSString *twitterName=[_engine extractUsernameFromHTTPBody:cachedData];
NSLog(@"username: %@", twitterName);
The format of extractUsernameFromHTTPBody in the SA_OAuthTwitterEngine.m is: - (NSString *) extractUsernameFromHTTPBody:(NSString *)body;
Why the warning? What is the right way for getting the Twitter username?