Iphone 无法验证您的身份
消息下面是我的代码。但我收到了错误消息“无法验证您的身份” 我怎样才能修好它 多谢各位 - (IBAction) sendButtonTapped: (id) sender { NSString* themessage = [NSString stringWithFormat:@" %@. I'm %@ and feeling %@ about it.", notesField.text ? notesField.text :@"", [activities objectAtIndex:[tweetPicker selectedRowInComponent:0]], [feelings objectAtIndex:[tweetPicker selectedRowInComponent:1]]]; NSLog(@"Twett buttone tapped "); //TWITTER BLACK MAGIC NSMutableURLRequest *theRequest=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://user name:password@twitter.com/statuses/update.xml"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; [theRequest setHTTPMethod:@"POST"]; [theRequest setHTTPBody:[[NSString stringWithFormat:@"status=%@", themessage] dataUsingEncoding:NSASCIIStringEncoding]]; NSURLResponse* response; NSError* error; NSData* result = [NSURLConnection sendSynchronousRequest:theRequest returningResponse:&response error:&error]; NSLog(@"%@", [[[NSString alloc] initWithData:result encoding:NSASCIIStringEncoding] autorelease]); //END TWITTER BLACK MAGIC } -(iAction)sendButtonTapped:(id)发件人{ NSString*themessage=[NSString stringWithFormat:@“%@。我对它感到%@和%@”, notesField.text?notesField.text:@“”, [activities objectAtIndex:[tweetPicker SelectedRowUncomponent:0]], [感觉对象索引:[tweetPicker SelectedRowUncomponent:1]]; NSLog(“Twett按钮点击”); //推特黑魔法 NSMutableURLRequest*theRequest=[NSMutableUrlRequestWithURL:[NSURL URLWithString:@]http://user 姓名:password@twitter.com/状态/update.xml“] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; [TheRequestSetHttpMethod:@“POST”]; [TheRequestSetHttpBody:[[NSString stringWithFormat:@“status=%@”,themessage]数据使用编码:NSASCIIStringEncoding]; NSURLResponse*响应; n错误*错误; NSData*结果=[NSURLConnection sendSynchronousRequest:theRequest returningResponse:&响应错误:&错误]; NSLog(@“%@,[[[NSString alloc]initWithData:结果编码:NSASCIIStringEncoding]自动释放]); //结束推特的黑魔法 }Iphone 无法验证您的身份,iphone,twitter,Iphone,Twitter,消息下面是我的代码。但我收到了错误消息“无法验证您的身份” 我怎样才能修好它 多谢各位 - (IBAction) sendButtonTapped: (id) sender { NSString* themessage = [NSString stringWithFormat:@" %@. I'm %@ and feeling %@ about it.", notesField.text ? notesField.text :@""
要调用twitter web服务API,您必须使用OAuth,了解它您可以尝试删除状态参数吗?在C#项目中,我删除了status参数,它就工作了