嗨我正在開發一個iPhone應用程序,我正在計劃實施一些語言翻譯功能。我已經購買了google transilator API並獲得了API密鑰。 現在按照Google提供的教程,我只是使用ASIFormDataRequest對此URL「https://www.googleapis.com/language/translate/v2?key=INSERT-YOUR-KEY&source=en&target=de&q=Hello%20world」進行HTTP調用。不幸的是,它結束了一個名爲Access not configured的訪問錯誤。我錯過了什麼?請幫幫我?如何在iPhone應用程序中使用Google翻譯器API V2?
ASIFormDataRequest *translateRequest = [ASIFormDataRequest requestWithURL:[ValidateClass getURL:@"Conversions.php"]];
[translateRequest setDelegate:self];
[translateRequest setRequestMethod:@"GET"];
[translateRequest setDidFinishSelector:@selector(didFinishRequest:)];
[translateRequest setDidFailSelector:@selector(didFailRequest:)];
[translateRequest setShouldAttemptPersistentConnection:NO];
[translateRequest setTimeOutSeconds:120];
[translateRequest startAsynchronous];
你真的在使用你的API密鑰嗎? – Abizern