Can't Get Firebase Google App Script Quickstart Tutorial to Work -


i can't seem firebase quickstart work me. i'm pretty sure followed of instructions correctly. i'm not getting access write database. , according instructions database open public suggest rules change displayed below. has ever gone through tutorial before? i'd hint next.

here's code.

  function writedatatofirebase() {   var ss = spreadsheetapp.openbyid("1rv2_s2q5rcakouhs2e1ilekr2floriozsytat2irxo8");   //var ss = spreadsheetapp.getactive();//i tried running data in spreadsheet copied recommended source   var sheet = ss.getsheets()[0];   //var sheet = ss.getactivesheet();   var data = sheet.getdatarange().getvalues();   var datatoimport = {};   for(var = 1; < data.length; i++) {     var firstname = data[i][0];     var lastname = data[i][1];     datatoimport[firstname + '-' + lastname] = {       firstname:firstname,       lastname:lastname,       emailaddress:data[i][2],       country:data[i][4],       department:data[i][5],       weight:data[i][6],       birthdate:data[i][7]     };   }   var firebaseurl = "https://script-examples.firebaseio.com/";   var base = firebaseapp.getdatabasebyurl(firebaseurl);   base.setdata("", datatoimport); } 

the data:

enter image description here

this library dialog:

enter image description here

this error keep on getting:

enter image description here

this name of script in firebase site:

enter image description here

this access rules change:

enter image description here

so guess missed important point. url of firebase database has projectid in it. url https://' + projectid + '.firebaseio.com'. sorry, bother such simple question.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -