Thursday, June 2, 2011

Twitter RSS feed creation cheat sheet

Ok, so apparently Twitter is no longer supporting RSS?
I tried doing an advanced search, and, sure enough, the "Feed for this query" button was gone. Then, when I mentioned it on Twitter, @shelitwits said it was still there for her, and when I checked again, it was back...
So... Yes, perhaps I'm going crazy and I just imagined it went away, but now I'm nervous. For now, search feeds are still working for me, whether the button is there or not, so I created a quick cheat sheet for myself, should I need to create a feed from a Twitter search without the handy button. I figured I'd post it here, for my own, and your, handy reference, should you need it. (Obviously, replace the bold text in the search strings with your own search terms/parameters.)


Hashtag search: http://search.twitter.com/search.atom?q=%23CiL2009


User mention search: http://search.twitter.com/search.atom?q=%40scwLibrary


Keyword search: http://search.twitter.com/search.atom?q=research+paper (replace the "+" with OR for searches that return any of the keywords, as opposed to all the keywords.)


Location + keyword search: http://search.twitter.com/search.atom?geocode=40.744544%2C-74.027593%2C5.0mi&q=+research+paper+near%3A%22hoboken%2C+nj%22+within%3A5mi


You can get the location code from location-tagged tweets in your search results, or from your profile page if you've enabled location-aware tagging on Twitter. You can also change the proximity parameter, set here to pick up tweets within 5 miles.


Also, I know it's redundant having the location & proximity twice, but this is how the feed generator creates the feed. I tried adding it to Google reader with only one or the other, and for me it worked with just the location code part intact, but did not work when I tried it just using the city and state part (which would have made life easier, since you could just plug that info in without having to look up a complicated location code, but hey, that figures, right?!)


Now, I realize that if Twitter completely stops supporting RSS, these feeds will probably no longer work, so let's just hope they don't do that. I tried using an RSS feed creator to make a feed out of the search results page (as recommended by @bibrarian,) but it didn't want to work for me (it said the page couldn't be found...)


I really hope Twitter rescinds its no-RSS stance, because I can't imagine administrating an institutional page without it. If I can't regularly monitor certain searches, that really cuts down on Twitter's usefulness as an outreach tool.


----------------------------------


UPDATE: Cynthia at LearningLibTech posted some additional details on creating an RSS feed from a specific user's timeline. Check it out here: http://cynng.wordpress.com/2011/07/05/twitter-search-rss-feed/ (and thanks to Desirae for sharing the link!)


UPDATE2: Thanks to ProfHacker for also linking to this post. I also hope my linking to posts that link to this post doesn't trigger infinite recursion and break the internet.


UPDATE3: the Sociable has created a feed generator for Twitter lists: http://sociable.co/2011/05/05/as-twitter-protects-its-ecosystem-heres-how-to-create-an-rss-feed-of-a-twitter-list/ (Thanks to Paul for sharing the link in the comments!)


UPDATE4: In response to a request by Twitter user @filip_struharik, I figured out how to combine user mention and user searches with hashtag searches. They work as follows:


User mention + hashtag: http://search.twitter.com/search.atom?q=%40val_forrestal+%23library
User + hashtag: http://search.twitter.com/search.atom?q=from%3Aval_forrestal+%23library


The difference between the two is that the first feed returns all results where the user @val_forrestal *and* the hashtag library appear. The second returns only results where the user @val_forrestal *uses* the hashtag library in one of her tweets (aka only tweets with the keyword "library" from that specific user's timeline.)


UPDATE5: Here's how to do searches that are restricted to a date or set of dates (or just since or up to a certain date).


http://search.twitter.com/search.atom?q=%23KEYWORD%20since%3A2012-01-24%20until%3A2012-01-25


...where KEYWORD = your hashtag, and the since/until are your start/end dates. You can leave out the "%23" before KEYWORD if you want it to be a simple keyword search, instead of a hashtag search.