NSMutableURLRequest *jaikuRequest=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://api.jaiku.com/json"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; [jaikuRequest setHTTPMethod:@"POST"]; NSString *jbody= [NSString stringWithFormat:@"method=presence.send&user=XXusernameXX&personal_key=XXpersonalkeyXX&message=%@", encodedMsg]; [jaikuRequest setHTTPBody:[[NSString stringWithFormat:jbody] dataUsingEncoding:NSASCIIStringEncoding]];
I wrote the code snippet above to post jaiku on jaiku.com. I met similar patterns in other languages ββfor publishing jaiku. However, I get the following response in the console:
{"status": "error", "message": "Invalid API user", "code": 0}
What could be a mistake, or if I'm wrong, what is the correct approach to posting jaiku using xcode?
source share