KinkyTwits - My ColdFusion And jQuery Powered Twitter Client
Posted October 6, 2008 at 9:10 AM by Ben Nadel
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.
| || || |
| || |
| || || |
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
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.
What Other People Are Searching For
[ local search ]
coldfusion twitter client
[ local search ] jquery twitter client
[ local search ] how to build a twitter client
[ local search ] twitter client with filtering
[ local search ] twitter client with smart groups
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?
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?
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.
Sure, I'lll send you a copy.
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.
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 :)
"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!
This is fantastic, and as usual it holds your distinctive style on the page.
Please could I have a look at the source code?
Thanks man. I'll send it along.
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.
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!
Ive been working on a Twitter CF app for a few months now: TweepleTwak.com
Some people have asked about the "multiple query" setting for this app. I am a huge fan of inserting and selecting in the same CFQuery tag. This needs to be set up in the MySQL data source in the ColdFusion administrator. See this post for more details:
Please could I have a look at the source code?
Thanks man. I'm gonna make some updates at lunch (add some debugging). I'll send you an update later today.
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!
@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.
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.
I saw your Tweets over the weekend and wondered if you would be sharing the code. Nice job Ben. Pretty cool! Gotta love jQuery + ColdFusion.
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.
Interesting! Now, if only there was a way to "mute" certain twitters, at least until after a certain event . . .
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.
Well if your in the sharing mood, sure! I'd love to see what you cooked up. Thanks!
I'll send it over.
Nice work! Now, if I could just get something that slick on my Windows Mobile....
Oh and love the app name. :)
Looks very nice, could I get a copy of the code source please...
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.
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~
This is on my list of things to share soon. Just working on cleaning up the code.
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.
@Craig, you might want to consider using something like this:
That will make posting to twitter from your CFML application a breeze.
@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#">
@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. :)
I am in need of a simple app like this so is there a way of getting a copy of it, please?
I never quite got it working well; but, if you want to look at it, it's on my projects page:
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.
great application hope you me post more application. http://www.blogsome.com
<cfhttp url="http://www.blogspot.com>SEO information</cfhttp>
<cfhttp url="http://www.blogspot.com">SEO information</cfhttp>