Google フォームに Http POST を実行する必要があり、アドバイス ( http://productforums.google.com/forum/#!topic/docs/iCfNwOliYKY ) に従って、次のような URL 構文を作成しました。
https://docs.google.com/forms/d/MY_FORM_ID&entry.2087820476=hello&entry.261928712=dear&submit=送信
最終的には iOS と Android から POST を実行しますが、単純にブラウザーでテストしていて、うまくいきません。「申し訳ありませんが、リクエストしたファイルは存在しません」という Google ドライブの応答が返ってきました。エントリは私の回答スプレッドシートには入りません。
私は何が欠けていますか?私はいたるところを見ましたが、この質問に答えるものは何もないようです。
編集:
ターゲット プラットフォームで直接テストした方がよい場合もあると思います。次のコードは iOS で機能します。
NSString *post = @"&key1=val1&key2=val2";
NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
[request setURL:[NSURL URLWithString:@"https://docs.google.com/forms/d/MY_FORM_ID/formResponse"]];
[request setHTTPMethod:@"POST"];
[request setValue:postLength forHTTPHeaderField:@"Content-Length"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody:postData];
NSHTTPURLResponse* urlResponse = nil;
NSError *error = [[NSError alloc] init];
[NSURLConnection sendSynchronousRequest:request returningResponse:&urlResponse error:&error];