0
내가 code.google에서 확인할 수있다 Google 데이터 API 샘플 터치 응용 프로그램을 사용하고 있습니다에서 만들 수 있습니다.트위터의 OAuth 문제는/... API를
내가 몇 가지 잘못하고있다면 말해주십시오.
로그인 한 사용자는 XYZ (보안 목적으로 XYZ 만 사용)을 따라야합니다.
내가 응답에서 URL
urlStr = @"http://api.twitter.com/1/friendships/create/XYZ.xml";
NSURL *url = [NSURL URLWithString:urlStr];
NSMutableURLRequest *request = [NSMutableURLRequest
requestWithURL:url];
//made post as requested in twitter API
[request setHTTPMethod:@"POST"];
ConnectAppDelegate *appDelegate = (ConnectAppDelegate *)
[[UIApplication sharedApplication] delegate];
[mAouth authorizeRequest:request];
NSError *error = nil;
NSURLResponse *response = nil;
NSData *data = [NSURLConnection sendSynchronousRequest:request
returningResponse:&response error:&error];
if (data) {
// API fetch succeeded
NSString *str = [[[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding] autorelease];
NSLog(@"API response: %@", str);
} else {
// fetch failed
NSLog(@"API fetch error: %@", error);
}
을 사용하고 내가 얻을
http://api.twitter.com/1/friendships/create/XYZ.xml 2010-06-11 16 : 04 : 39.437 연결 [4265 : 20B] API 응답 :
<?xml
version="1.0" encoding="UTF-8"?>
<hash>
<request>/1/friendships/create/XYZ.xml</request>
<error>Invalid/used nonce</error>
</hash>