Method to Use Bit.ly URL Shortener Service


#1

We all make Apps. In some apps we also use URL Shortening Component. It can be used by the Google URL Shortener Extension by NMD.
But I think why don’t we make Bitly URL Shortener Method. So I found the most easiest way by sending a Request to Bit.ly by using a Web Component. See the below Attached Screenshot.


I have made a Proper Procedure for the link Shortening Method. The URL we send to Web Component is as Follows
https://api-ssl.bitly.com/v3/shorten?access_token=(Access_Token)&longUrl=(Your_URL)&format=txt
*Things you need
A Access Token of Bitly and the Long URL
You can get the Access token by going to bit.ly>Menu>Settings>Advance Settings>Oauth>Generic Access Token
Remember you can’t just send a Normal URL to be Shortened. It should be Percent Encoded. For Percent Encoding I make another Result Procedure. It carries around 18 Text Replacement Blocks as their are total 18 Characters in a URL which needs to be encoded.
All this setup works to send a Request to bit.ly and when we got the Response from Web Component we can use it anywhere we need it.
You can Download Sample Apk and Aia below:-
bitly.aia (4.2 KB)
bitly.apk (2.3 MB)