fixed problem with OAuth login and reply_id
This commit is contained in:
parent
dd0991c316
commit
dff8d4a1a6
3 changed files with 13 additions and 10 deletions
13
OAuth.m
13
OAuth.m
|
@ -89,10 +89,11 @@
|
|||
|
||||
- (void)requestAccessTokenWithPIN:(id)sender {
|
||||
|
||||
[twitterPINPanel resignKeyWindow];
|
||||
[twitterPINPanel close];
|
||||
NSLog(@"%@", [twitterPINField stringValue]);
|
||||
|
||||
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@?oauth_verifier=%@", OAUTH_ACCESS_TOKEN_URL, [twitterPINField stringValue]]];
|
||||
[twitterPINPanel resignKeyWindow];
|
||||
[twitterPINPanel close];
|
||||
|
||||
OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url
|
||||
consumer:consumer
|
||||
|
@ -125,13 +126,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)apiTicket:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data {
|
||||
if (ticket.didSucceed) {
|
||||
NSString *responseBody = [[NSString alloc] initWithData:data
|
||||
encoding:NSUTF8StringEncoding];
|
||||
NSLog(@"%@", responseBody);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)accessTokenTicket:(OAServiceTicket *)ticket didFailWithError:(NSError *)error {
|
||||
NSLog(@"ERROR a: %@", error);
|
||||
|
|
Reference in a new issue