'Trying to use PostToURL with data to Google spreadsheet with apps script
Im working on an IOS app and want to post data from it to an google spreadsheet to store the data. Im a really noob when it comes to javascript etc. and get get this to work..
from my IOS app im sending data with "PostToURL" to the web app script, like this:
postToURL("https://script.google.com/macros/s/AKfycbwcgriuDZHzYZD3Dg7Tg1jBAM8Ow3wmodHZBSd/exec", "name: testname, score: 1234", function(event:Event):Void
2.Then im using this script in the google app script connected to my google spreadsheet:
function doPost(e){
var post = JSON.parse(e.postData.getDataAsString());
var sheet = SpreadsheetApp.getActiveSheet();
var score = post.score;
var name = post.name;
sheet.appendRow([name, score,])}
Can anybody see whats wrong?
thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
