2017-02-15 80 views
0

我想在AppMaker應用程序中獲取當前網址。但是,標準JavaScript方式不起作用,ScriptApp在AppMaker中不可用,並且AppMaker中的對象不返回正確的URL(以https://script.google.com開頭)。如何獲取Google AppMaker中的網址?

感謝您的任何建議。

+0

您可以AppUrl字段添加的AppSettings模型和初始化它的應用程序啓動在服務器端。這裏是鏈接到詳細的技術說明:http://stackoverflow.com/questions/41904477/integration-between-different-google-appmaker-apps/41905378#41905378 –

+0

如果您只需要URL參數,您可以檢查此應用程序腳本API:https://developers.google.com/apps-script/guides/html/reference/url#getlocationfunction –

回答

6

您可以運行一個後臺/服務器端腳本,並使用Google Apps腳本

ScriptApp.getService().getUrl() 

看到該文檔ScriptApp Documentation

+0

返回網絡應用的URL(如果已部署);否則返回null。 – Morfinismo

+0

啊,謝謝你使用服務器端的提示。 – Scott

相關問題