我得到了一个
Script function not found: doGet
或
Script function not found: doPost
当我获得/POST到我的Google脚本时:
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 URL时,我会得到上面的错误。但当我使用Hurl.it时,我只会被重定向到Google Drive。但是当我“为你的最新代码测试web应用程序”时。在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
https://stackoverflow.com/questions/22617138
复制相似问题