Google apps script 应用程序脚本:UrlShortener.newUrl().setLongUrl()不再工作
以下代码(直接从Google Apps脚本网站的UrlShortener文档页面复制)在6月17日(更新时)停止工作Google apps script 应用程序脚本:UrlShortener.newUrl().setLongUrl()不再工作,google-apps-script,Google Apps Script,以下代码(直接从Google Apps脚本网站的UrlShortener文档页面复制)在6月17日(更新时)停止工作 在本例中,toShorten一直在返回“未定义”。是。UrlShortner APi已更改。对您的代码进行此小更改 var toShorten = UrlShortener.newUrl(); toShorten.setLongUrl("http://example.com"); var shortened = UrlShortener.Url.insert(toShorten)
在本例中,toShorten一直在返回“未定义”。是。UrlShortner APi已更改。对您的代码进行此小更改
var toShorten = UrlShortener.newUrl();
toShorten.setLongUrl("http://example.com");
var shortened = UrlShortener.Url.insert(toShorten);
看看哪一个谈论了完全相同的问题是的。它已经改变了。见[相关答案][1]。[1]:
var toShorten = UrlShortener.newUrl();
toShorten.setLongUrl("http://example.com");
var shortened = UrlShortener.Url.insert(toShorten);