Smiles vs. Frowns on Twitter

February 3rd, 2009  |  Published in ruby

98E35206-4115-46D3-94E4-A90C042056DC.jpg

Posts with “:)” vs. posts with “:(” on Twitter over the past 28 days.

Actually, Twitter’s API treats those two terms as special operators, so you get back posts with :) :-) :D :-( :( etc. It’d be nice if the JSON Twitter sent back included post mood as an attribute. Instead, you’ve got to just look at the text of each post and decide where it falls because =~ /:\)/ won’t cut it. I punted and just looked for “)” or “(” and left it at that.

Leave a Response

© Michael Hall, licensed under a Creative Commons Attribution-ShareAlike 3.0 United States license.