Permalink
Browse files

Closes GH-27. Parses OAuth token manually with TouchJSON enabled

  • Loading branch information...
1 parent d1829a5 commit 413d1e9cb0be7c370b251fe27f96a09832cf3347 @stevestreza stevestreza committed May 22, 2010
Showing with 12 additions and 3 deletions.
  1. +12 −3 MGTwitterEngine.m
View
@@ -727,9 +727,18 @@ - (void)_parseDataForConnection:(MGTwitterHTTPURLConnection *)connection
break;
}
#elif TOUCHJSON_AVAILABLE
- [MGTwitterTouchJSONParser parserWithJSON:jsonData delegate:self
- connectionIdentifier:identifier requestType:requestType
- responseType:responseType URL:URL deliveryOptions:_deliveryOptions];
+ switch (responseType) {
+ case MGTwitterOAuthToken:;
+ OAToken *token = [[[OAToken alloc] initWithHTTPResponseBody:[[[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding] autorelease]] autorelease];
+ [self parsingSucceededForRequest:identifier ofResponseType:requestType
+ withParsedObjects:[NSArray arrayWithObject:token]];
+ break;
+ default:
+ [MGTwitterTouchJSONParser parserWithJSON:jsonData delegate:self
+ connectionIdentifier:identifier requestType:requestType
+ responseType:responseType URL:URL deliveryOptions:_deliveryOptions];
+ break;
+ }
#endif
}

0 comments on commit 413d1e9

Please sign in to comment.