Flickr/Tweetie Bridge (with flic.kr short URLs!)

A couple of days ago I saw Bart Mroz testing out a new service that lets you post your images directly to Flickr via Tweetie 2.  It’s a great idea, but it seems like there’s an unnecessary 3rd party in there.  Flickr already has the http://flic.kr/ short URL, so it seems like you should be able to post your images to Flickr and receive the official short URL for that image.

Well, that’s exactly what my Flickr/Tweetie Bridge does.  Just set it up, plug the URL into Tweetie, and you can start uploading/shortening with Flickr.  It hasn’t been very heavily tested, but it’s working fine for me.  Check out the 0.1 release.  It’s PHP5-only, and released under GPL.

Let me know if you come across any bugs, or have feature requests.

Related posts:

  1. Better short URLs Recently a bunch of people have been proposing ways to...
  2. Stock: phase 2 http://flic.kr/… Stock: phase 2 http://flic.kr/p/7FFSni Link to this post!...
This entry was posted in Open Source. Bookmark the permalink.
  • http://twitter.com/inxilpro inxilpro

    Just released: Flickr/Tweetie bridge with flic.kr short URLs http://bit.ly/FosuU

    This comment was originally posted on Twitter

  • http://twitter.com/eliot eliot

    @jmissig Found a better Tweetie-Flickr method. http://bit.ly/pMaOn

    This comment was originally posted on Twitter

  • http://eliot.landrum.cx Eliot

    Thanks much for the script! This is really clean and simple.

  • http://flickr4twitter.com Steven Haddox

    This sounds like a great option for personal use, but for those who may be looking for an easy to use service that is SSL enabled, uses Twitter OAuth, and the Flickr API you should also feel free to check out my project (Flickr4Twitter) at: http://flickr4twitter.com

    It’s not quite as easy to implement for most developers unless you know Ruby and Rails, but the website should be easy to use and implement for the average user :)

    Thanks for the great PHP option and keep up the great work!

    • http://cmorrell.com Chris Morrell

      Good to know. Just for clarification, this PHP script can run as SSL (or not) and uses OAuth and the Flickr API. You pretty much upload it and follow a few simple instructions. Basic PHP knowledge would be helpful, but you can probably figure it out without it…

  • http://www.robmac.net Rob McDougall

    This isn’t what I use Flickr for! I used to… but then I started putting up proper photographic “work”. Sounds like a great idea – but I’ll just stick to Twitpic et al…

    • http://cmorrell.com Chris Morrell

      Just wanted to point out that it does let you tag all Tweetie uploads with a specific tag (or set of tags), so you could easily separate out “junk” images from “proper” images.

  • http://hnkns.com Timothy Hankins

    Thank you! This works like a charm and makes Tweetie 2 all the more fun and useful. Great work, and great form making this freely available.

  • int

    Thanks for this!

    Wondering, would it be possible to make it so the pictures gets uploaded with no title at all? If I remove the default title it will just generate some random letters. I’d prefer if it removed the title altogether in that case. Or maybe same title as the picture? iphone pic 1, 2,3 etc.

    • http://cmorrell.com Chris Morrell

      There’s no way to use the image title itself because Tweetie doesn’t send that information with the image. I think that you could just set FLICKR_TITLE to and empty string and that would work.

      Alternately, Tweetie 2.1.0 and later sends the tweet along with the image data, so you could potentially use a truncated version of that. I haven’t tried this, but something along the lines of:

      define('FLICKR_TITLE', substr($_POST['message'], 0, 20)); // 20 is the length you want to truncate to
      

      Give either of those a shot and let me know if you need more help.

      CM

  • int

    Sweet, that solution will work for now (work perfectly btw). Ideally an empty title would be the best, but as I said, it puts some random jibberish with an empty FLICKR_TITLE. I bet Tweetie doesn’t send somekind of trackback url to the tweet? That would be another solution.

  • Chuckanery

    Dude, I totally want to use this, but I’m totally clueless on how to open the php file. I’m running Windows 7…please help!

    • http://cmorrell.com/ Chris Morrell

      You need to run the file on a web server that have PHP 5 installed on it. You could try NearlyFreeSpeech.NET as a cheap hosting option. Then just open the PHP file in something like Notepad and follow the instructions inside.

  • http://www.jameshill.tv James Hill

    Hi! Just trying to combine your code with Cloudie (http://cl.ly/sWk) at the moment. I think all I need to do is get the long url from Flickr, how would get that instead of the short url that your code currently gives? That long url can then be passed to Cloudie to shorten, somehow! :)

    Thanks!

  • http://www.jameshill.tv James Hill

    Managed to get it working! Needs more work though, the title it passes needs to check for apostrophes etc. Also, it keeps putting spaces before the link it attaches for some reason. http://cl.ly/qZp

  • http://www.jameshill.tv James Hill

    Hi again! I’ve popped the code up on my blog for Cloudie Flickr. It seemed your code was putting backslashes in the Flickr titles next to apostrophes, so I fixed that with stripslashes. http://cl.ly/s2M

  • Pingback: tanniespace » Geeking out with twitter and flickr stuff

    • http://cmorrell.com/ Chris Morrell

      Very cool. I might add that hashtag feature to the original code…

  • http://wrkng.net Nick Grossman

    Thanks Chris – I just set this up and it worked like a charm. Very nice.

  • Pingback: [Tutorial] Flickr als Bilderdienst für Tweets | timomontalto.com