我得到一個谷歌Apps腳本功能未發現:的doGet
Script function not found: doGet
OR
Script function not found: doPost
當我GET/POST到我的谷歌腳本
:
function doGet(e){return ContentService.createTextOutput("User says")}
function doPost(e) {
return HtmlService.createHtmlOutput(
"<form action='http://www.example.com/users/gmail_permission/' method='post' id='foo'>" +
"<input type='hidden' name='gmail' value='getEmail()' >" +
"<input type='hidden' name='id' value='e.parameter.user_id' >" +
"</form>" +
"<script>document.getElementById('foo').submit();</script>");
}
function getEmail() {
return Session.getActiveUser().getEmail();
}
怪異事情是當我在瀏覽器上訪問Webapp網址時,我會得到上述錯誤。但是當我使用Hurl.it時,我只是被重定向到Google Drive。但是當我'爲最新的代碼測試網絡應用程序'。在google.script.com上,GET響應正常工作。
是怎麼回事漂亮失去了作爲....這裏是我的腳本:
https://script.google.com/macros/s/AKfycbz0XGeoEuP4V6W60N7yP-dDiLltPefxmqzhMJurnGzOhPfqA_er/exec
這裏是GET的
FROM Hurl.it - GET https://accounts.google.com/ServiceLogin?service=wise&followup=https://script.google.com/macros/s/AKfycbz0XGeoEuP4V6W60N7yP-dDiLltPefxmqzhMJurnGzOhPfqA_er/exec&continue=https://script.google.com/macros/s/AKfycbz0XGeoEuP4V6W60N7yP-dDiLltPefxmqzhMJurnGzOhPfqA_er/exec&passive=1209600
FROM script.google.com - https://script.google.com/macros/s/AKfycbyCH4Jk7VcEIhE52jIorIBzcghRYAPRuwuzFSHwaWIB/dev
FROM browser - https://script.google.com/macros/s/AKfycbz0XGeoEuP4V6W60N7yP-dDiLltPefxmqzhMJurnGzOhPfqA_er/exec
您是否保存過版本併發布該版本? –
你會顯示你的獲取和發佈到網絡應用程序 – DavidF
@Sergeinsas我已經保存併發布了上述版本 – echan00