Roll Your Own Twitter Clone

Tweet

birdyEveryone’s talking Twitter, right? And there’s Plurk, Jaiku, and Identica—in fact, there’s dozens of new microblogging services popping up every week.

If you’re anything like me, you’ve already wondered how easy it would be to make your own—perhaps you’d like to set up a microblog for you and your colleagues to share links and have discussions. Or, perhaps you have a cool idea for a new social network surrounding your favorite topic.

Whatever your plans, the good news is that it’s easy to host a microblog of your own, using any one of several free tools. Today we’ll look at three new solutions that are easy to set up, have reasonably modest hosting requirements, and even include some features that blow Twitter out of the water.

P2 for WordPress

Last month saw the announcement of P2, a special theme for use with WordPress.com and self-hosted WordPress installations that makes a regular blog look and act more like a microblog. It’s an upgrade of the Prologue theme that was released early last year, and if you’re comfortable with WordPress you’ll certainly find this is easy to understand.

For those of you who are running your own WordPress installation, adding P2 is as simple as activating a theme: just upload the P2 files to the appropriate spot on your web server, and activate it in the WordPress administration panel. Get it from the Theme Directory or grab it with SVN:

svn checkout http://svn.automattic.com/wpcom-themes/p2/

Otherwise, you can try P2 on a free WordPress.com blog right away.

P2 features a number of Ajax enhancements that make browsing and posting extremely fast. Keyboard shortcuts are available that make navigating your P2 microblog as fast as typing; posts and comments can be added and edited without a page refresh; and there’s even a heads-up notification area that lets you know immediately if fresh content has appeared since you first opened the page. If you’re looking for Twitter-like features such as marking an item as a favorite or the ability to befriend other users, these are unavailable by default, but WordPress’s wide variety of plugins can help you add those features. New users are able to become blog authors right away, so if your aim is to create a new free-for-all microblog, you’ll be able to achieve that with P2.

WordPress’ installation requirements are quite straightforward and should be available on most web hosts: you’ll just need PHP and MySQL. Both WordPress and P2 are free.

Motion for Movable Type

Also freshly revealed last month, Motion is an extension to blogging platform Movable Type Pro, and it’s an interesting blend of social aggregator and microblogging service.

Installing Motion is fairly straightforward—simply install Movable Type, create a new blog, and when the wizard asks for the type of blog you wish to create, use the Motion setting.

Visitors can sign up to the service either directly through your Movable Type instance, or by using their account from a number of other authentication methods such as a Google Account, Facebook Connect, or an OpenID. Unlike WordPress, above, newly registered users can only comment on a blog—but it’s a snap for a blog administrator to promote that user to full posting rights if required; alternatively they have the option to create a new, self-contained Motion blog for every registered user.

One fun feature in Motion is the ability to aggregate social actions from other locations on the Web. Authors are able to pull in their posts on other social media services, such as their Twitter stream, an RSS feed, or their Delicious bookmarks—and there are dozens of other sites to choose from. Those actions become part of each author’s individual page, along with their contributions to your own blog, and can also be added to the homepage of your blog.

Movable Type’s installation requirements are fairly easy to accommodate—you’ll need an Apache or IIS web server, a PostgreSQL or MySQL database, and the ability to use Perl. The cost is based on your Movable Type Pro licence, which depends on your organization—non-profits, educational institutions, and individuals can use it for free, but for-profit organizations need to pony up the cash. You’ll find the details on the Movable Type download page.

Laconica

If you’re looking for a solution that’s most like Twitter, Laconica might be the choice for you. Laconica is the platform that powers Identica and the TWiT Army and it’s packed with interesting features such as groups, instant messaging, posting via email, and the ability to send and receive messages from other Laconica installations. Desktop clients are already available, and there’s an API to use if you find yourself in need of one.

Laconica’s web-based installation wizard takes just a few moments to initialize your database and set up your service; once that’s done, you’re ready to start microblogging right away. But to start taking advantage of some of the more interesting features of Laconica, such as posting by instant messenger or SMS support, you’ll need to dirty your hands with a configuration file. Fortunately, the configuration directives are well documented in a README file, and there’s a sample configuration file to show you how it’s done.

It’s also a little fiddly to adjust the appearance: Laconica supports themes based on CSS only, and at the moment there are no plans to allow users to edit the HTML that Laconica produces without editing the application itself. Fortunately, the markup is full of IDs and classes with which to work your CSS magic.

Laconica’s installation requirements are fairly modest: you’ll need a web server running Apache, PHP 5.2 or better, MySQL 5.x, and some additional PEAR modules—the complete list of system requirements is available in the README file that accompanies the download. What’s more, it’s open source—hack away!

Conclusion

We’ve looked at just three microblogging applications, each with different strengths and weaknesses. The platform you choose really depends on your goals—are you creating a site for you and your friends or colleagues, or are you aiming to create a Twitter-killer? Whatever your aim, by now you hopefully have a good idea of where to start.

Free JavaScript: Novice to Ninja Sample

Get a free 32-page chapter of JavaScript: Novice to Ninja and receive updates on exclusive offers from SitePoint.

  • SoreGums

    Thing about Twitter is it has a large following, all the people you want to interact with are probably on Twitter. Plus Destroy Twitter is an awesome client.

    So I’d like is a way to have my Tweets show up on my WP blog as styled posts that appear inline and then when I post a blog entry it Tweets with a link and title.

    This is pretty much available in a hodge podge, band aid, DIY kinda way. It’d be nice if it were all rolled up into a simple plugin :) This way you get to make a lot of noise on Twitter and your blog involved directly :)

  • http://www.heyraena.com raena

    @SoreGums you’re right — but sometimes the kind of community you want to build needs to stay on your own home turf.

    I would never, for example, recommend that a workplace used Twitter (even with private accounts) for workplace discussion. There’s too much risk of security drama.

  • http://www.lopsica.com BerislavLopac

    I’d like to invite everyone to check Shout’Em.

  • Youkho

    Laconica is great didn’t knew about it, you can also make a microblogging site with drupal though a little bit complex but those familiar with it can make something identical to twitter.

    Thanks for the post really useful

  • Joseph Scott

    P2 is now available at the theme directory: http://wordpress.org/extend/themes/p2

  • http://www.hipstyleandvalue.com/ Jessica45

    Thanks for the information! I didn’t even realize how many blogging applications exist! For me facebook is MORE than enough! ;)

  • http://01-global.net 01globalnet

    Laconica seems nice. I’ll have to test it.

    There is also Grooner – http://groonesworld.com/

    Test profile at their demo http://groonesworld.com/grooner/index.php/a/01globalnet

  • http://www.heyraena.com raena

    @Joseph Scott – thanks for the heads up; I’ll update the post! :)

  • Anonymous

    I don’t understand. Using Django, or RoR, you could build exactly the same thing as Twitter in about 10 days. How has Twitter been so glorified as to be considered a hard-to-replicate software that needs tons of open source projects to try to bring it down. I swear to god, if somebody would be willing to pay me my normal salary (about 7-8k for the two weeks), I would build for them a full exact clone of Twitter. Give me another 2 weeks, and BYO servers and load-balancers, and I could give you in one month’s time what Twitter has down to the last pixel, except it’d probably need about half the resources, making it possibly a profitable business. Their first problem is that they used RoR in the first place though. If they wanted to create something that could make money, the needed to use Java. The entire savings the company had on initial costs time are literally lost ever 30 minutes on hardware usage, and electricity.

    See, the difference between “””web 2.0 startups””” with unqualified children, and real programmers is that real programmers (or even real web developers) aren’t impressed by such a simple piece of software and a SOAP/REST API.

  • orokusaki

    I don’t understand. Using Django, or RoR, you could build exactly the same thing as Twitter in about 10 days. How has Twitter been so glorified as to be considered a hard-to-replicate software that needs tons of open source projects to try to bring it down. I swear to god, if somebody would be willing to pay me my normal salary (about 7k for the two weeks), I would build for them a full exact clone of Twitter. Give me another 2 weeks, and BYO servers and load-balancers, and I could give you in one month’s time what Twitter has down to the last pixel, except it’d probably need about half the resources, making it possibly a profitable business. Their first problem is that they used RoR in the first place though. If they wanted to create something that could make money, the needed to use Java. The entire savings the company had on initial costs time are literally lost ever 30 minutes on hardware usage, and electricity.

    See, the difference between “””web 2.0 startups””” with unqualified children, and real programmers is that real programmers (or even real web developers) aren’t impressed by such a simple piece of software and a SOAP/REST API.