in Feed Readers, Feeds

Further explorations of the TweetsToRss tool

I am using the TweetsToRss tool created by Dave Winer to get a set of tweets for a Twitter user and convert it to a RSS feed (wrote a previous blog post comparing this tool and Granary). When I started using the tool, I saw that it only listed tweets created by the user (no replies). I decided to look at how to add replies as part of the RSS feed.

Twitter has an API reference page for data contained in a user timeline. I decided to review TweetsToRss to see if some of this data was present. In tweetstorss.js, there is an array called “params”, which sets screen_name to the variable username, and trim_user to “false”. I was thinking that I would have to add some additional parameters to this array based on the API reference page. However, upon further review of the source code, there was some logic to not add replies (lines 437-441):

[cc lang=javascript]
if (flSkipReplies) {
if (thisTweet.in_reply_to_status_id != null) { //it’s a reply
flInclude = false;
}
}
[/cc]

The value of flSkipReplies is set to true in line 36. I changed this line to set flSkipReplies to false, and was able to see replies in the RSS feed – yay!

One last thing – I tested having flSkipReplies set to both true and false, and saw that the version of the RSS feed with replies had 20 items, where the version of the RSS feed with no replies had only 10 items. May still be a thing or two to play around with here….

Write a Comment

Comment

Webmentions

  • This Article was mentioned on brid-gy.appspot.com

  • This Article was mentioned on brid-gy.appspot.com