How to Make YOURLS.org Work in Tweetbot

We are big fans of Tweetbot here at 2FatDads, ever since Twitter started to tear all of the goodness out of Tweetie, we jumped ship and started toying around with other clients until we finally discovered Tweetbot.

However one of the big key tools that Twitter striped out of Tweetie that we really liked was the Custom URL Shortner service. We use YOURLS here and have always found it important that we be able to tell our readers and followers that the link we are using has been 2FatDads approved. So with the release of Tweetbot 2.0, we noticed that Custom API Endpoints where available and that we could, once again, use our own YOURLS server to to shorten links.

Services

  • URL Shortening via Twitter, bit.ly Pro, CloudApp, Custom API Endpoints

However trying to find out how to do it was not very easy. So lets walk it though and hopefully help out a few others along the way.

First you will need to log into your YOURLS admin page and recuperate your secret token and the structure for the “Secure passwordless API call” it will a little like this:

http://SITE/yourls-api.php?signature=SECRETTOKEN&format=simple&action=shorturl&url=%@

Where SITE is your domain name and folder structure leading up to the yourls-api.php file. for example ours in http://2fatdads.com/u/

Next SECRETTOKEN is the site specific code that appears on the YOURLS tool page.

And finally %@ is the specific call to the URL being handed over for shortening.

And with that, any link you share via Tweetbot will be shortened using your own YOURLS server and not t.co or bit.ly.

via Tweetbot — Tapbots.

[__UPDATE__] This has been verified to work with TweetBot 3 which is iOS 7 ready.


Comments

14 responses to “How to Make YOURLS.org Work in Tweetbot”

  1. Thanks for the helpful instructions. I’ve just set up my own YOURLS server and followed these instructions to the letter but whenever I try to post a tweet with a link Tweetbot gives a messages saying the link couldn’t be shortened. Do you have any suggestions please? Everything on the server seems to be working fine and I’m using a Google Chrome extension successfully to automatically generate custom urls.

  2. This is actually a recent problem that the YOURLS folks had to do to make their version compatible with Twitter’s 3rd party app policy which is what you build when you use your YOURLS profile to connect to Twitter. The plugin developer actually mentions to simply disable the auto-Tweet and install the Simple Twitter Connect plugin by Otto @ WP: http://ottopress.com/wordpress-plugins/simple-twitter-connect/ which actually behaves the way that the previous YOURLS plugin did. (Sorry if this sounds a little confusing, Otto’s site explains it all very well.)

  3. Thank you, thank you, thank you. I’ve been wanting to do this for some time now.

  4. Thanks so much for the information! I downloaded Netbot today and realized I could use my YOURLS for the shortened urls. Google the problem and found your article!

  5. Awesome, glad it helped!

  6. […] But there was one small issue: what about Tweetbot (the best Twitter app for iOS & Mac OS X) & Netbot (the best ADN client for iOS & hopefully soon Mac OS X)? The two ’bots provide the built-in ability to use a few URL shortening services (Goo.gl & Bitly, for instance), or—& this is the cool part—you can specify your own. Problem is, there’s not a lot of help in that area. Fortunately, I found this article at 2fatdads.com (great domain name, btw) that tells you all you need to know: How to Make YOURLS.org Work in Tweetbot […]

  7. Hi

    Many thanks for this. A great solution.

    Works great for new shortened URLs, but if using one for which a custom URL has already been done, it seems to make a new one.

    Any tips on this?

    Cheers

    Des

  8. The YOURLS service has no way of knowing whether the URL you are providing it is shortened or the original one. Therefore when called it simply creates a new one. This is by design, too many lookups could possibly hang the script and you have the extra benefit that your twitter followers will see your YOURLS link and recognise it as an approved link since it’s now branded with our domain.

  9. Des Paroz

    Thanks for replying. Shame this feature is missing, as I’d like to be able to have one consistent view of stats, and a simple message for my readers.

    But your explanation makes sense and appreciate the insight.

  10. Great instructions, worked perfectly first time. Thanks guys!

  11. Thank you guys! This was of great help.

  12. I set up my Tweetbot this way but for some reason URLs are not shortened. Any thoughts?

    Thanks

  13. Just wanted to say thanks! This is fantastic, you’ve saved me a lot of work. Oh, and when I tweeted using a long URL that was already in YOURLS, it detected that and returned the existing URL rather than creating a new one. So that’s wonderful.

    Again, thanks for the post!

    Chris