KinkyTwits - My ColdFusion And jQuery Powered Twitter Client (Beta)
It's taken me a long time to actually get to this point, but I finally found the time to clean up KinkyTwits, my free ColdFusion and jQuery powered Twitter client. It's not the best application out there, but if nothing else, it has some pretty cool jQuery, ColdFusion API, AJAX, and JSON examples. Plus, it runs without a database, you can pretty much drop it on your ColdFusion server and it just works (I love me some portability). You can get the source code off of my KinkyTwits Project page.
|
|
|
|
|
|
|
|||
|
|
|
Some cool features:
- Stores data in JSON files so it can run without a database.
- Task Bar window tab displays number of unread messages since window lost focus.
- Custom groups allow you to filter statuses based on regular expressions.
- Custom groups have option to remove statuses from general feed. The more people you follow, the more essential the ability to weed out posts of non-interest (ex. Woohoo! Taco Bell for lunch!).
- Groups get visually highlighted when they contain new statuses.
- URL shortening service runs of an interface which means you can (programmatically) swap out different services, including professional ones what require a login and track clicks).
- You can "snooze" users if they post annoying tweets (filters statuses into "Snoozed" group automatically for a given amount of time - additional hour per snooze).
- Heavily commented code so you can easily follow the logic.
I am sure I will be making more updates to this over time. Since I first created the front-end for this, I have learned a lot more about some cool jQuery features; so, hopefully, I will begin to clean up the interface using things like the data() method and other good stuff.
Reader Comments
Congrats on the release Ben ... I know you've put a ton of time and effort into this project.
Congratulations Ben.
You've put so much hard work into this, and I've been watching it ever since the first Alpha release. You should be very proud, and thank you for releasing it to the CF community.
Excellent work, Ben!
@All,
Thanks guys. When I first coded this, ALL of the code was in the public CFCs. It was a total mess. I then took it all and broke it down to having public CFC and cached CFCs. The public CFC do little more than handle the AJAX response and make calls to the cached service CFCs. I think it's a much cleaner architecture.
You are a Coldfusion animal, nay, a jQuery animal. Really really super impressive work. Teach me! :P
Thanks. Been waiting for this moment!
Suggestion: Put the app in a folder called kinkytwits under the folder called 2009_02_02, so that it's easier to unzip and move into a meaningful folder on our web-root structures.
@jyoseph,
Thanks man, always glad to put stuff out there.
@Robert,
Sorry about that. I don't actually know great strategies for zipping. I never know if I am supposed to zip a folder or zip the contents of a folder. Then, when it gets unzip, do I zip to new folder?
The only think I know is that I hate when I unzip to a new folder (ex. site) and then I click into it and in it is another folder of the same name. Grrr! :)
Tweet: I'm pooping....it's almost out....it's out....i'm flushing. Forgot to wipe.
@Eric,
Ha ha ha ha ha.
Post to RIAForge perhaps?
Awesome Job Ben!
Is there a page we can try it out on your website?
Oh and good job btw D:
@shuns,
You can't because it needs a username and password for Twitter. However, someone suggested turning this into a hosted service. Would be interested, not sure how that would work.
@Ray,
I'll try to rock that out tonight.
@Brandon,
Thanks my man.
Wow.... awesome.
You're a machine!
;-)
Checkin' this out.
@Ben: regarding hosted service - You just store the username/pass for the length of the session and don't store anything else but preferences in the db. Voila, hosted service. Now, I don't recommend this, but hey... there's a gazillion websites out there that follow this same model (twitpic.com, twittersheep.com, etc).
@Todd,
I like the idea of a hosted service... but, if Twitter has problems with traffic and its their full-time gig - that doesn't bode well for me handling traffic as a fun project :)
@Ben: Yup. Sounds about right. You'd have to have some kind of service that would monitor when Twitter was sucking and post a user to the message that twitter response time is slow as balls. Then again, none of the RIA twitter apps do. I think Twirl notifies me by saying that the API-usage got lowered, that's usually first sign of something going awry.
Don't know how I missed that one, but excellent job!!!
@Marcos,
Thanks man. Still working out some bugs, but its coming along.
Wow Ben, this is really impressive!
@Phillip,
Thank man :) In my spare time, I trying to revamp it again, although I don't have much time.
Nice work!
One thing I noticed was in TinyURLService.cfc you were pointing to http://tinyurl.com/create.php and using regex to extract the url.
There is a TinyURL api which just simply returns the url, without tons of html. No need for the regex. Simply change create.php to api-create.php.
eg.
http://tinyurl.com/api-create.php?url=http://www.google.com
returns:
http://tinyurl.com/dehdc
@Mike,
Thanks a lot. I thought there had to be a better API for the service, but couldn't find it.
Arr is this for cfml 8 isnt it ?????????.
looks cool though. is their anything I can do or modify to make it work on 7. i feel left out, i want to tweet.
I keep getting error
Invalid token '{' found on line 26 at column 36
any ideas
seems the problem is to do with the cf8/9 javascript-style create structs and arrays.
eg.
myStruct = {};
myArray = [];
try replacing {} with structNew()
and [] with arrayNew(1)
or upgrading to cf8
can someone please post a modified Application page for use with cfml 7. I have been trying mikes idea. But i just cant get it. Or maby direct me to a good post on changeing the syntax to make cfml 7 friendly. I would love to go to version 8. But i have been working with gdiddy and they have set me up the most perfect cfml server. Flawless !_! so cant move
Sweet, I'm loving it, I'm usin' it.
Can this setup be used to programmatically post tweets?
I'm hoping to use a few functions out of the twitter service CFC to post tweets completely unattended. Does that capacity for re-use exist in this CFC?
I've seen some that require the user to log in interactively to post the tweets.
Thanks,
Dan
@Dan, monkehTweets will let you store the client and user OAuth keys in the Application scope, removing the necessity to authenticate for every request. This means you can run scheduled tasks and updates through the library. http://monkehtweet.riaforge.org/
@Matt Gifford
thanks thats awesome - What an incredible set up monkehtweets is.
oAuth and such is new territory for me.
If you will indulge and answer one more question: If i have it working now - how often will I need to update the tokens or secrets?
Thanks,
Dan
@Dan
Once you have the tokens and secrets generated through the Twitter Application console, you will only ever need to update them if you revoke access for that application to access that particular user.
OAuth does over-confuse things, but essentially if you have one user auto-tweeting from one application, you will never have to update the token values once they are set in the Application scope, unless you choose to delete / revoke that user.
The information in this site seems to be beautiful and also interesting.Thanks for sharing..!!