Creating a site wide Twitter presence
Problem: Although there are existing Twitter modules for Drupal 5.x (Twitter and Tweet) they do not work as desired for the blog site: http://blogs.familyeducation.com/parenting. The blogging on this site takes place by professional writers, members of the site may only comment and not contribute their own blog content. They wanted to have a Twitter presence that represented all of the bloggers on this site and so that all of the articles would be "tweeted" in one Twitter stream: http://twitter.com/familyeducation
I wrote a module called twittercron to check for new blog entries via cron, every ten minutes or however often cron is set up to run. I created a Twitter account "familyeducation" and recorded the username and password in the admin settings for the module. This also removes the problem of having each of the bloggers having the main familyeducation twitter password. They could also use their own twitter accounts and use the existing Twitter module to tweet their own blogs to their own Twitter streams.
For this module I created a table called twittercron to collect new blog content that had not been tweeted yet. This table also serves as a log of content that is tweetable. There is a field that indicates whether or not the blog had been tweeted.
I put in watchdog code to track this modules activity for testing and troubleshooting purposes.
This module for Drupal 5.x is attached below:
| Attachment | Size |
|---|---|
| twittercron.module | 2.86 KB |

