How To Use Your Custom Yourls Shortener with Tweetie 2

October 9th, 2009

Just a quick little tip here for those of you who are using the brand new version of Tweetie for iPhone [iTunes link].

If you are using Yourls, a great custom URL shortener (that I use all the time for my egord.in domain name), you can actually have Tweetie shorten your twitter urls using your custom domain name. Using the Yourls API, the process is simple.

In Tweetie’s settings (accounts~~>settings~~>url shortening~~>custom…), type or paste the following URL, replacing the text in all caps with your domain name, yourls username, and password (note: for this to work, you cannot have any characters in your username and/or password that are not letters or numbers):

http://YOURSITE.COM/yourls-api.php?action=shorturl&url=%@&username=YOURUSERNAME&password=YOURPASSWORD&format=simple

Then just click Save. You can also set your yourls installation to public (its in your yourls includes/config.php file), and then not include the &username and &password portions. As the yourls dev Ozh explained, you could also make a secret copy of yourls-api.php and make it public by removing the top line including the authorization information.

Hope that helps!

[update]: Added the portion about how special characters are not allowed in usernames & passwords (thanks @mirthlab).

  • http://www.copress.org/2009/10/24/wordpress-2-8-5-is-out-updates-to-courant-news-and-details-on-the-columbia-spectator/ WordPress 2.8.5 is out, updates to Courant News, and details on the Columbia Spectator | CoPress

    [...] How To Use Your Custom Yourls Shortener with Tweetie 2 – Simple tutorial on how to use your self-hosted URL shortener with Tweetie 2. Yourls is a slick piece of software for hosting your own URL shortener. [...]

  • http://www.pottblog.de/2009/12/28/hinwe-is-eigener-kurz-url-dienst/ hinwe.is: Eigener Kurz-URL-Dienst » Pottblog

    [...] Eine Sache die mir bei dem Script sehr gut gefällt ist das Vorhandensein einer API6. So kann ich beispielsweise über den iPhone-Twitterclient Tweetie (2), den ich vor kurzem hier getestet habe, auch von unterwegs solche Links anlegen. Details dazu gibt es beispielsweise im Blog-Beitrag How To Use Your Custom Yourls Shortener with Tweetie 2. [...]

  • http://www.lovemuffin.ca Kray

    Thanks a ton for this!!!

  • http://www.igxr.com John Davis

    I installed YOURLS on my site the other day, I had spammers using it within 24-48 hours. I put captcha in place and it has stopped the bad guys. Check it out here live:

    http://www.igxr.com

    If you have any questions on how to setup captcha on it please feel free to contact me through my site.

  • http://www.eugenegordin.com egordin

    Thanks for the comment John! I keep my yourls installation for personal use only so I do not have a spam problem, but I could see how that would be problematic. Nice work!

  • Wes Plate

    I copied the URL code on your page, pasted it into a text file and then replaced the host address, username and password. Then I copied this new URL and sent it in an email to my iPhone’s email account then on the phone copied the URL and pasted it into Twitter for iPhone (Tweetie). Somewhere along the way the %@ characters became %25@, which I didn’t realize, so for a while the shortening was simply not working with my custom domain. I took a close look at the URL inside Twitter for iPhone then discovered the slight change in the URL. Once I edited it to remove the unwanted characters it worked great!

    Thanks for the page.

  • http://www.lobachev.ru Vitaliy

    Also work in TweetDeck! :)

  • E.J. Semeijn

    I noticed that the URL needs the ‘www’ in Tweetie2 to function. Is there any way around it? Nevertheless it’s great you shared this with the community

    Sincerely @3v3rt

  • http://mike3k.wordpress.com/2010/10/05/links-for-2010-10-05/ links for 2010-10-05 « Mike's Blog

    [...] How To Use Your Custom Yourls Shortener with Tweetie 2 I would love to be able to do this with Echofon (tags: howto twitter yourls) [...]

  • Daniel

    Okay… Where do I set the Username/Password?
    I am a complete noob when it comes to APIs :/

random tips & tricks

this is where I share with you (my two readers) my posts which have no better category.

take a look around and be sure to let me know in the comments which posts you find helpful.