I am building a twitter client for the IPhone and I'm using OAuth to authenticate my requests to twitter,
Right now I am able to get the home time line and even post tweets ( that do not contain any spaces or symbols) the problem starts when I try to post a tweet that contains spaces for example it gives me :{"error":"Incorrect signature","request":"\/1\/statuses\/update.json"}
For example the tweet : "ThisIsATweet" works, but the tweet : "this is a tweet" doesn't work here's my http request body code:
NSData* body =[NSString stringWithFormat:@"status=%@",[self percentageEncoding:tweet]];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[request setValue:[NSString stringWithFormat:@"%d",[body length]] forHTTPHeaderField:@"Content-Length"];
[request setHTTPBody:[body dataUsingEncoding:NSISOLatin1StringEncoding]];