Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.04 KB

File metadata and controls

34 lines (25 loc) · 1.04 KB

This is a helper to shorten links using bitly. It is simple to implement and uses
ASIHTTPRequest and SBJSON

Replace the kBitlyLoginName and kBitlyAPIKey in BTBitlyHelper.m with your login name and api key.
The sample project shows the basic use for this helper. Any links entered into the text view are shortened and replaced.

The helper makes use of the following delegate methods.

/**
 *  Receives the shortened url for the given original url.
 *
 *  @param  shortUrl    The short url received from bit.ly.
 *  @param  originalUrl The original url given to bit.ly.
 */
- (void) BTBitlyShortUrl: (NSString *) shortUrl receivedForOriginalUrl: (NSString *) originalUrl;

/**
 *  Called when the queue starts processing.
 */
- (void) BTBitlyQueueStartedProcessing;

/**
 *  Called when the queue is done processing.
 */
- (void) BTBitlyQueueFinishedProcessing;

This free to use however.