Skip to content

Commit

Permalink
Double-escaping URL seems to work. Barf.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattt committed Dec 28, 2011
1 parent 8b3bd71 commit 3025244
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Twitter Example Client/AFNetworking/AFOAuth1Client.m
Expand Up @@ -258,13 +258,18 @@ - (void)acquireOAuthRequestTokenWithPath:(NSString *)path

[parameters setValue:kAFOAuth1Version forKey:@"oauth_version"];

[parameters setValue:@"af-twitter://success" forKey:@"oauth_callback"];

[parameters setValue:@"af-twitter%253A%252F%252Fsuccess" forKey:@"oauth_callback"];


NSMutableURLRequest *mutableRequest = [self requestWithMethod:@"GET" path:path parameters:parameters];
[mutableRequest setHTTPMethod:@"POST"];

[parameters setValue:AFSignatureUsingMethodWithSignatureWithConsumerSecretAndRequestTokenSecret(mutableRequest, self.signatureMethod, self.secret, nil, self.stringEncoding) forKey:@"oauth_signature"];

[parameters setValue:@"af-twitter://success" forKey:@"oauth_callback"];


NSArray *sortedComponents = [[AFQueryStringFromParametersWithEncoding(parameters, self.stringEncoding) componentsSeparatedByString:@"&"] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
NSMutableArray *mutableComponents = [NSMutableArray array];
for (NSString *component in sortedComponents) {
Expand Down

0 comments on commit 3025244

Please sign in to comment.