About Chris Morrell

I am a Philadelphia web designer and developer who focuses on PHP development and usable design. I am also the Director of IT for the International Association of Certified Home Inspectors.

Please Note: My site fell victim to a Wordpress security flaw a few weeks ago, and I'm just getting everything back to normal. Please bear with me.

I am currently not accepting any new clients.

Other Sites/Clients

Contact Me

If you need to get in touch with me, my name is Chris and my domain name is cmorrell.com. Think about it.

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

Posted by Chris Morrell on October 18th, 2009 in Open Source

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.

20 Comments »

20 Responses to “Flickr/Tweetie Bridge (with flic.kr short URLs!)”

  1. inxilpro

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

    This comment was originally posted on Twitter

  2. eliot

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

    This comment was originally posted on Twitter

  3. Eliot

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

  4. 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!

  5. 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…

  6. 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…

  7. 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.

  8. 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.

  9. 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.

  10. 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

  11. 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.

  12. 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!

  13. 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.

  14. 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!

  15. 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

  16. 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

  17. tanniespace » Geeking out with twitter and flickr stuff

    [...] I found a php script by Chris Morrel which allows you to post photos to flickr (and get the correct flic.kr short url [...]

  18. Chris Morrell

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

  19. Nick Grossman

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

  20. [Tutorial] Flickr als Bilderdienst für Tweets | timomontalto.com

    [...] original Skript stammt von hier, da ich aber ein paar Probleme damit hatte, biete ich eine leicht geänderte Version. Wer also [...]

Leave a Reply

Additional comments powered by BackType

Comments & Trackbacks

You can leave a response, or trackback from your own site. Follow any responses to this entry through the RSS 2.0 feed.

More...

@inxilpro

  • Wet Hot American Summer at World Cafe Live. It's free and dead. 2 days ago
  • Would really like something that combines Twitter starred + Google Reader starred/liked + Delicious.com. Does such a thing exist? 6 days ago
  • Also, how can OS X be so rock solid and other Apple-developed software be so buggy? 1 week ago
  • More updates...
Copyright © Chris Morrell, Powered by WordPress, Entry RSS Feed / Comment RSS Feed