MooBitly-Link v0.0

Takes advantage of Bitly Link API to ease make use of it.


Luis Carlos Osorio Jayk
Current version
GitHub Issues



  • _self_/_current_: More/Request/JSONP

How to use

First you need to follow Bitly instructions on how to register an application.
You can read about at

As a simple example, you could use the following lines at Document Head:
It requires More/Request.JSONP class to work.

        <title>My Fantastic Facebook App</title>
        <script type="text/javascript" src="mootools-core.js" />
        <script type="text/javascript" src="mootools-more.js" /> <!-- Request.JSONP class required -->
        <script type="text/javascript" src="MooBitly.js" />

        [... whatever else you have in your document head]

        <!-- Your html code -->

then use the Bitly app login and apiKey to create an instance of MooBitly this way:
var moobitly = new MooBitly('myLogin', 'myApiKey');

The complete documentation of Bitly API can be found at:

How To Make Api Calls

After you MooBitly instace is created, you can call for api methods, like expand, info, lookup and shorten.
All these methods expect a function to be called at onComplete event of the request made.

moobitly.shorten('', null, function(response) {
    // Do something with api response here...

The MooBitly.js file is well documented with info of each method argument.

MooBitly also has a caching feature if you use the id argument of methods, you can retrieve/remove the response of that call later.


There is a (maybe not well known) Bitly feature for shortened url's, and this that Bitly can return QRcode image of shortened url's.

To generate a QR code, simply append .qrcode to the end of any bitly link. For example:
QR codes of different sizes can be generated by adding ?s={size} to the QR code URL.
A QR code of the closest standard size (in pixels) will be returned.

<img src="" />
<img src="" /> <!-- For a 1000px (square) size image -->

You can read more at:


Donations are welcome. By donating you contribute to this and other Open Source efforts.


A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus