Goo.gl URL Shortener Registration Page

This is the registration page for Goo.gl API.

Try it out

This is a simple demo. Shorten this page using the Goo.gl URL Shortener

Registration

It is simple to set up an app to be able to handle incoming data. This Goo.gl Bridge will let anyone shorten a url using the Google URL Shortening service

<intent action="http://webintents.org/shorten"
  type="text/uri-list"
  href="shorten.html"
  disposition="inline" />

The above tag just needs to be placed on your page, with a "href" of the page you want to be opened and now your page will be able to be launched via the Web Intent system when a user invokes the "shorten" intent.

How to Shorten the link

The code for invoking the "shorten" intent is below.

  var link = document.getElementById("linkToShorten");
  var shorten = document.getElementById("shortenButton");
  shoren.addEventListener("click", function() {
    var url = link.value;
    var intent = new Intent("http://webintents.org/shorten", "text/uri-list", url);
    window.navigator.startActivity(intent, function(data) {});
  }, false);