Questions tagged [bit.ly]

Bit.ly is an URL-shortening service

Bitly is an URL-shortening service, which provides an extensive API for programmers to easily integrate URL-shortening services into their own applications. Bitly's API supports JSON and XML, and allows retrieving statistics about specific short URLs.

203 questions
132
votes
5 answers

Parsing JSON from XmlHttpRequest.responseJSON

I'm trying to parse a bit.ly JSON response in javascript. I get the JSON via XmlHttpRequest. var req = new XMLHttpRequest; req.overrideMimeType("application/json"); req.open('GET', BITLY_CREATE_API + encodeURIComponent(url) +…
chanux
  • 1,829
  • 4
  • 16
  • 20
118
votes
4 answers

How do short URLs services work?

How do services like TinyURL or Metamark work? Do they simply associate the tiny URL key with a [virtual?] web page which merely provide an "HTTP redirect" to the original URL? or is there more "magic" to it ? [original wording] I often use URL…
Nathan Campos
  • 28,769
  • 59
  • 194
  • 300
18
votes
6 answers

jQuery on the fly URL shortener

I'm looking for an on the fly URL shortener much like how tweetdeck works. I have found many jQuery and general javascript plugins that take a url and run it through a shortening service such as bit.ly when a button is pressed. However, I have not…
Jason
  • 17,276
  • 23
  • 73
  • 114
16
votes
3 answers

Using Only Javascript To Shrink URLs Using The Bit.ly API

I'm playing a bit with Javascript these days... I was shrinking some URLs using bit.ly to tweet them, then I started to think on a automated process that could use their API to shrink the URLs I wanted, then I looked up on their documentation, and I…
Nathan Campos
  • 28,769
  • 59
  • 194
  • 300
14
votes
1 answer

Python: Convert those TinyURL (bit.ly, tinyurl, ow.ly) to full URLS

I am just learning python and is interested in how this can be accomplished. During the search for the answer, I came across this service: http://www.longurlplease.com For example: http://bit.ly/rgCbf can be converted…
TimLeung
  • 3,459
  • 6
  • 42
  • 59
12
votes
5 answers

Which HTTP redirect status code is best for this REST API scenario?

I'm working on a REST API. The key objects ("nouns") are "items", and each item has a unique ID. E.g. to get info on the item with ID foo: GET http://api.example.com/v1/item/foo New items can be created, but the client doesn't get to pick the ID.…
Aseem Kishore
  • 10,404
  • 10
  • 51
  • 56
11
votes
2 answers

Bit.ly bitlink creation always return forbidden even after email verification?

I have registered and done email verification. Then, I try the most baisc API trying to shorten a testing link. The following is my HTTP packet. POST /v4/shorten HTTP/1.1 Host: api-ssl.bitly.com Content-Type: application/json Authorization: Bearer…
cytsunny
  • 4,838
  • 15
  • 62
  • 129
8
votes
1 answer

Integrate to Bit.ly API Version 4 - How to Generate OAuth2 Token to integrate with Bit.ly API V4 and create a shortened url?

I was having the hardest time trying to generate the OAuth2 token to integrate with the Bitly API v4. Their documentation was hard to comprehend and I couldn't find much online or on StackOverflow on how to accomplish it. I was able to get it to…
Andrew Reese
  • 854
  • 1
  • 11
  • 27
7
votes
3 answers

How to get long URL from short URL?

Using Ruby, how do I convert the short URLs (tinyURL, bitly etc) to the corresponding long URLs?
user61734
  • 2,813
  • 5
  • 25
  • 18
7
votes
2 answers

Is it possible to generate custom bit.ly URLs through their API?

I would like to be able to generate custom bit.lys (http://bit.ly/thecakeisalie type things) through their API. This does not appear to be possible, but I thought I'd check; does anyone happen to know otherwise?
chaos
  • 122,029
  • 33
  • 303
  • 309
7
votes
0 answers

Automatically shortening URL for Email/Facebook shares with Bitly through AddThis API

I am unable to shorten the URL being shown in the AddThis email popup when using the built-in Bit.ly shortening service in AddThis. It works with Twitter, but not Facebook and email. Is this supported? var addthis_share = { url:…
crmpicco
  • 16,605
  • 26
  • 134
  • 210
7
votes
5 answers

c# shortening string for url

i want to uniquely shorten strings-file ids to use in urls like the ones on bit.ly etc. I can use ids from a db but i want urls to be random like. what would be the best solution? site will be a mobile site so i want to it to as short as possible
nLL
  • 5,662
  • 11
  • 52
  • 87
6
votes
2 answers

Javascript Regex: surround @_____, #_____, and http://______ with anchor tags in one pass?

Related (but slightly different): Surrounding all instances of @________, #___________, and http://_________ with anchor tags? I would like to surround all instances of @_______, #________, and http://________ with anchor tags in one pass. For…
rawrrrrrrrr
  • 3,647
  • 7
  • 28
  • 33
5
votes
2 answers

How to shorten URL using PHP Bitly v4?

I have this code for Bitly v3 and it is working well.
Abel Callejo
  • 13,779
  • 10
  • 69
  • 84
5
votes
1 answer

Convert eBay Link Generator results into bitly.com link

I managed a small PHP script that takes the eBay product searched and converts it into promote eBay link. It goes like this: user searches for example: ocz vertex clicks on "Submit" and gets the results in following…
StackBuck
  • 789
  • 1
  • 12
  • 34
1
2 3
13 14