Posting jaiku using xcode

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?

+4
source share
1 answer

You are trying to use outdated authentication, which is outdated and it seems that it may not be fully functional (of course, not verified):

http://www.jaiku.com/api/docs/authentication

You should try using the new OAuth authentication, which they document at the link above. definitely more complex (and safer).

+1
source

Source: https://habr.com/ru/post/1299080/


All Articles