0

I am developing a web application in which I have implemented Facebook and Twitter connectivity.I want to shorten the url when user post to facebook or twitter from my apllication. For example if url is http://www.MyDomain.com/user/234545 then it should be somwthing like http://M.D/n2b

How can I do that. Please help & also please give me more info about how actually the url shorter works and how to implement it in rails

mandar.gokhale
  • 1,876
  • 1
  • 18
  • 37
  • http://stackoverflow.com/questions/7302700/is-there-any-gem-plugin-available-to-create-your-own-url-shortener-service-using – Dave Newton Sep 13 '11 at 12:29

2 Answers2

1

For starters, you would need to purchase the "M.D" domain, and I don't even think that exists. So your next option would be to use a subdomain of your "MyDomain.com", like "short.MyDomain.com" and stick a Rails app there that could map your shorter URLs. Ironically, the URL would be nearly as long.

It wouldn't surprise me if some of the URL shorteners already out there have some kind of HTTP API. If so, you're probably better off using them.

bioneuralnet
  • 5,283
  • 1
  • 24
  • 30
1

use bitly or tinyurl or you can create your own method for shorten url if you are using your own method then you cannot change the domain name you have to use some sort of API for doing this.

Muhammad Sannan Khalid
  • 3,127
  • 1
  • 22
  • 36