Scott Rutherford

Life on and off the Rails

 

Twitter API: User IDs

May 29th, 2008

So, next lesson from TweetLists: the user id given in the xml from the public timeline is not a unique identifier. The screen name is the only way to identify a user. I ended up with 17 different ids for one user!!! Hence, gave up fixed it and dropped the database – too much effort to fix when its only been running for 12 hours.

TweetLists

May 29th, 2008

I released TweetLists last night, well actually this morning (about 3am), the idea being to try and capture a little of the zeitgeist on Twitter by aggregating the links people are talking about. At the moment there are 3 lists, the live feed, a popular feed (the links ordered by the number of times they appeared) and one I have chosen to call Twitterati (quite proud of that!) which is the links ordered by the number of followers people have.

At the moment there is no time aspect to the Twitterati or Popular lists (not relevant on the live one) but I guess I will make them for the last 7 days?

Lesson one form this has been: don’t try and be clever with your scheduling – cron just works. I tried to use the Rufus Scheduler and it had stopped running by the time I got up again this morning.

Anyhoo, I’ve found it to be fun and interesting so far, any ideas for other lists?

Found a bit of a gotcha when building a form recently using form_for, fields_for and the check_box helper. Because Rails adds a hidden field for each checkbox and fields_for for new objects produces ids like ‘users_invites__selected’, if you try to generate multiple new objects in the same form things can get a little confused. I found that when selecting a single checkbox things worked ok, but when selecting multiple the values would bleed across each other. I haven’t investigated this very far just switched to check_box_tag instead (no hidden field).

Actually just found this post mentioning that the checkboxes might be broken in Rails 2.0.2. Which could be the cause of the issue.

I added the UserVoice feedback system to the FCKeditor demo page today. So any bugs or ideas for the plugin can be stored in a central place. If you have found any issues recently (and can be bothered) it would be great if you could put them up there. I will copy over any ones I find going back over the comments. Ta.

This blog used the Shay theme as a base and is powered by Mephisto