Display your Twitter feeds

Here is a simple way to display your latest Tweets from Twitter on your site. All you need is a very nice plugin called kml_twitter.

First step – create a cache folder

Once the plugin is installed, you need to create a folder in your /texpattern directory called cache. The folder needs to be writable, set this to 777.

Download and install the plugin

After creating the cache folder, download the kml_twitter plugin, install and activate.

Start your Tweets!

This plugin has many attributes and I use only a couple in the following sample code:

<div class="details">
<h2>Twitter</h2>
<txp:kml_twitter user="your_name" displaytitle="false" breaktag="p" titletag="" wraptag="p" wraptag_class="" />
</div>

Note: On my web host (Joyent), I got a PHP error after activating the plugin. In my case, I had to enable the extension=json.so in my php.ini file.

comments powered by Disqus