Skip to main content
Ben Nadel at cf.Objective() 2011 (Minneapolis, MN) with: Johnson Tai
Ben Nadel at cf.Objective() 2011 (Minneapolis, MN) with: Johnson Tai

KinkyTwits - My ColdFusion And jQuery Powered Twitter Client

By
Published in , Comments (40)

Last week, I had mentioned on Twitter that I was gonna try to build my own Twitter Client for yucks (trying to attain true Geek status). I came up with "KinkyTwits". I put a good 12 or 13 hours into this over the weekend and I think I came up with some cool stuff. It's definitely rough and the code really needs to be organized much better, but it's working as a really basic Twitter client.


 
 
 

 
KinkyTwits - ColdFusion And jQuery Powered Twitter Client By Kinky Solutions.  
 
 
 

Watch the Demo Video Here

The backend is powered by ColdFusion, naturally, and MySQL. The front end is powered by jQuery. The whole thing is basically a single page application (what you see above). I tried to build this using a lot of Twitter feedback that I saw over the last few weeks. In particular, I got the feeling that people wanted:

  • Filtering based on patterns
  • Smart Groups
  • Snoozing

I tried to include all of that in this initial beta.

There's a lot of things that it doesn't have yet like TweetPics and URL shortening. But, I don't think those things would be too complicated to add. I am gonna continue working on this, see how it performs. If anyone wants the code, let me know.

Reader Comments

11 Comments

Looks cool, Ben. I'm curious, are you running the back-end on a web server? I'm guessing so, because you say it's ColdFusion powered.

I've thought of doing something similar, but always come back to the idea that this approach could be a potential scaling issue if the app were to get popular.

Do you know if other AIR clients like TweetDeck and Twhirl use a back-end server, or if they interface directly with the Twitter API?

11 Comments

I meant to include this in my previous comment: I've liked the grouping of TweetDeck, but it's always felt a little clunky to me. I'd love to try yours out for a while. Can you send me a copy?

15,848 Comments

@Adam,

Yeah, it is running off a server. I thought about this for a while and I came to the conclusion that that was the way to go. For starters, its just a personal client, so I wouldn't except this to be run as a service for a large group of people (but I guess that could change).

But, mostly, what I like is that CF and MySQL act as the go-between. Meaning, the HTML/jQuery interface only feeds from the MySQL database. It *never* touches Twitter directly (except to post a status). The action of pulling Status feeds from Twitter and caching them locally is totally asynchronous to the main application. This allows me to apply all the filtering and grouping and organization. Sure, I suppose I could do that on the fly in there interface or during the call, but I would rather not.

3 Comments

Hey! Nice work so far! Meets my needs directly.

Was wondering if I could take you up on your offer and get the code?

I'm trying to get my Wife's "Moms Club" up on twitter, and the real issue they have is they want the ability to have sub-groups (so they can include/not include certain other moms from certain tweets -- go figure). Your "groups" functionality looks to cover this issue nicely!

Thought I might take what you've done so far, and run with it!

Perhaps you could zip up the code and send it to the listed email address (or maybe you have a "package" link you could point me to or SVN repository?)

I could pay you if need be! Do you have an Amazon wish list?

BTW - have you noticed lately how all the online "social" issues resolve around they ability to _filter_ your relationships? I guess Clay Shirky nail it.

15,848 Comments

@Robert,

I'll shoot you a copy. It's really rough right now. There is no session management or anything. It's really just a proof of concept right now. My Twitter login is actually hard-coded right in my Application.cfc file. I really wanted to see if this concept was even worth pursing. Now that I think it is, I will go back and refactor, make session management, etc.

That's said, I'll send a copy :)

3 Comments

You wrote:

"But, mostly, what I like is that CF and MySQL act as the go-between. Meaning, the HTML/jQuery interface only feeds from the MySQL database."

If I understand you correctly, indirectly you cover the issue of Twitter taking back the "trac" abilities. Recording the stream (in your mySql) allows to gain back some of that capturing of the "firehose" stream for searching and aggregation.

That's a benefit!

18 Comments

Hi Ben

This is fantastic, and as usual it holds your distinctive style on the page.
Please could I have a look at the source code?

Many thanks,

Matt

15,848 Comments

@Robert,

I'm not exactly sure what you;re saying, but yes, the firehose of Twitter statuses is copied to my local MySQL server, which is what feeds the interface. This actually helps me to simplify the filtering process greatly as I am really, behind the scenes, duplicating the Tweets for each group.

32 Comments

Heck, if you are giving out the code I would love to take a look :-) I have been meaning to sign up for twitter so I cnow have a good excuse!

15,848 Comments

@Abul,

Thanks man. I'm gonna make some updates at lunch (add some debugging). I'll send you an update later today.

15,848 Comments

Just realized that General and Direct messages are handled in COMPLETELY different ways, including totally different response format. It's lunch time, gonna see if I can karate shop these updates!

15,848 Comments

@Abul et al,

I was able to update the app on my lunch break (and re-emailed to you). I fixed the Direct messages and added local logging for errors.

15,848 Comments

Just a general note of caution:

Do not run my Twitter client along side your old one. This will eat up your API allowance very quickly! Regardless of mine, you should only ever use one Twitter client.

I learned that the hardway when I was developing and I exceeded my limit in about half an hour (rather than an hour). I was burning the candle at both ends.

15,848 Comments

@Steve,

I make no claims on the code, but if you want to see it, just let me know. It's been a lot of fun, thanks.

148 Comments

Interesting! Now, if only there was a way to "mute" certain twitters, at least until after a certain event . . .

15,848 Comments

@Lola,

You can "snooze" a user. Every time you click their "snooze" link, it increases their snooze length by another hour (with no limit to how many times it can be clicked). When a user is snoozed, their tweets get auto-filtered into the Snoozed group and do not show in the General Tweets.

I am working on updating my Groups to allow you to add Users to them, rather than just regex filters.

4 Comments

Nice work! Now, if I could just get something that slick on my Windows Mobile....

Oh and love the app name. :)

5 Comments

Hi Ben,

Very sweet looking app. I am writing a Twitter app as an exercise in getting back into CF dev, initially just using the built in CF AJAX tags. I am having a lot of problems with layouts, flickering refreshes, and even incompatibility with the built in stuff (cfdiv vs. cfcalendar), so would really like to see your code to get a better idea of using jQuery.

TIA,
-Rob

1 Comments

Very Nice Work!

I'm thinking developing japanese version of twitter like app for my family and friend in japan. This will be perfect for starting it.

Could you kindly share your genius code source please~

Thanks

4 Comments

Ben:

I've been running into a real issue with doing a simple Twitter update of late from a CFML powered site. Is your source viewable? What I'm trying to do should be easy but it simply isn't working for me and other CF/Twitter information sources on the web are few and far between.

If it is viewable, may I have a look at it? I'm really trying to get a good idea of what I'm doing wrong as opposed to looking for a prebuilt solution (although if your solution does the job, I'd like to discuss using it in my app with you).

Thanks in advance.

4 Comments

@Adam, thanks. I had run across that early on and it failed like all the others.

As it turns out, as I was posting this, I did discover the solution to my issue was a CFML language problem rather than anything I was doing incorrectly or anything like that. I have a workaround that looks like this:

<cfhttp url="http://twitter.com/statuses/update.xml" method="POST" username="#variables.Tusername#" password="#variables.Tpassword#" charset="UTF-8">
<cfhttpparam type="HEADER" name="Authorization" value="Basic #ToBase64(variables.Tusername & ':' & variables.Tpassword)#">
<cfhttpparam type="FORMFIELD" name="status" value="#variables.Tstatus#">
</cfhttp>

22 Comments

@Craig, I wonder if Twitter recently changed their API. They've been known to do that. If you have specific problems, I would recommend logging them on the issues page for the RIAForge project. Not enough people do that. :)

1 Comments

Nice idea!

I am in need of a simple app like this so is there a way of getting a copy of it, please?

tia

1 Comments

Hello Ben, congratulation for this great app. Could you share you code with me? I´m needing create this kind of interface in our intranet to tweet at our corporative twitter. Thank you.

1 Comments

@Ben,

I'm very curious as to your approach to displaying tweets utilizing ColdFusion. I've learned recently that twitter has basically shut down their RSS feeds, so what method do you use to display tweets? As you've offered, could you please share your code?

Many Thanks!

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel