Google URL Shortener API - 入门

时间:2016-08-30 15:23:39

标签: google-url-shortener

我正在尝试在Script.google.com中运行Google的API示例here中的示例。

示例代码:

function getClicks(shortUrl) {
  var url = UrlShortener.Url.get(shortUrl, {
    projection: 'ANALYTICS_CLICKS'
  });
  Logger.log('The URL received %s clicks this week.', url.analytics.week.shortUrlClicks);
}

错误:

Required parameter: shortUrl (line 2, file "Code")

我错过了什么?

0 个答案:

没有答案