I have been tweeting and I have been blogging. My blog is powered by WordPress. Integrating the blog and micro blog (Twitter) makes sense and recently I made Twitter and WordPress talk to each other, using WordPress plugins. I used not one, not two but three plugins to perfect the integration as per my taste.
Here is how it started. My initial wishlist from this integration was as follows:
Referring to the second point, I did not want a blog post each, for every tweet. Instead I wanted a single blog post with all my tweets – say, for the day.
The plugin which served my above mentioned requirements is Alex King’s Twitter Tools which can be downloaded from here. After installing the plugin, I created a category in WordPress called Tweets. Next, I configured the plugin (Settings>Twitter Tools) as shown in the screenshot below (click on the image to view the settings clearly):
Note that I have set “Create a blog post from each of your tweets?” to No, but have set the option “Create a daily digest blog post from your tweets?”. Also I selected the Tweets category for “Category for tweet posts:”. With this, all my tweets will be automatically posted on my blog, under the Tweets category, at 23:59 hrs, every day.
I also opted to use the Twitter Tools widget to display the latest Tweets on my Blog’s sidebar. Depending on whether your WordPress theme is widget enabled, you can setup the Twitter Tools widget via Appearances>Widgets – just the standard WordPress way to display widgets. If you scroll down on my blog’s home page, you can spot this widget, titled “WHAT I’M DOING”.
As a Result
With Twitter Tools, the following is achieved:
But Some Issues
The popular Twitter Tools serves well but not perfect and hence the following issues:
I solved the above two issues with a WordPress plugin for each – namely WP Calais Archive Tagger and Ultimate Category Excluder respectively.
Automatic tagging with WP Calais Archive Tagger
This plugin uses the Opencalaisservice to analyze, semantically, the text of the blog post and automatically generates the relevant tags for each post. After installing this plugin, all I had to do is to supply it with a Opencalais API key, which I already had. You can get a API key by registering, for free, at http://www.opencalais.com/user/register. Once registered, the key will be emailed to you. Type in that key in “Plugins>Calais Archive Tagger” page on the WordPress admin panel.
Subsequently, clicking on the link “Click here to start tagging your posts” automatically start tagging all the posts including the daily twitter updates. Note that it maintains the tags that were entered manually against the blog posts and adds onto them. As you may have guessed, each time you want the Calais Archive Tagger to generate meta tags, you will have to come to this page and click on the link. I do it once in a day or two. Someone has also written a Cron friendly script to make this happen automatically. I’m not using it, yet.
Note that I have been using All in One SEO Packplugin which displays the past tags as meta tags, on the blog pages, for search engines. Without this plugin, the automatically generated tags may not help in the search engine context. This plugin is highly recommended whether or not you are integrating with Twitter.
Exclude Tweets from Home Page and RSS with Ultimate Category Excluder
This is a nifty and easy to use plugin. Following are the screenshots of how my blog’s home page displays without and with this plugin:
Note that with the Ultimate Category Excluder plugin, none of the “Twitter Updates” posts are showing on the home page. A visitor can still access these posts via archives, category (on the sidebar) or using the search. All I had to do, after installing the plugin, is to exclude the Tweets category in the plugin’s settings (Settings>Category Exclusion) as shown in the screenshot below:
Note that I have opted to exclude the Tweets category from the home page and from the feeds. I left it to appear in the Archives. Bottom line: integrating WordPress perfectly with Twitter requires more than just the Twitter Tools 🙂
Update (November 15, 2009): All of a sudden, after October 28, Twitter Tools stopped posting the daily digests of tweets onto this Blog. Similar/same issue is posted hereby others. Blaming WordPress upgrade to 2.8.5 and my server operating system upgrade to CentOS 5.4 did not make sense because these happened before this issue occurred. That is, the daily digests did work, for a few days, after the upgrades.
I kept trying miscellaneous ideas like downgrading to Twitter Tools 1.6, deactivating/deleting the plugin and re-installing the upgrade to WordPress 2.8.5, but nothing worked. Finally what worked for me is as follows:
delete from wp_options where option_name like 'aktt%';
Henceforth you should start receiving the digests. I applied this fix on 10th November and it is working for me, for far, even after an upgrade to WordPress 2.8.6.
Update (December 23, 2009): Updated my blog to WordPress 2.9 on December 18th. Twitter Tools working so far without any issues.
Update (February 4, 2010): Updated Twitter Tools to version 2.1.2 on January 25th. Waited for this long to update this post because I wanted to ensure that the daily digests of tweets are posted, regularly, as before. It seems to be working! Expect that on January 30th, the digest got posted thrice. Besides this one of case, Twitter Tools 2.1.2 is behaving. Also after upgrading to Twitter Tools 2.1.2, Open Web Analytics dashboard started working. Earlier I had to deactivate Twitter Tools temporarily to look at the Analytics dashboard.
Update (May 28, 2010): Again, Twitter Tools stopped posting daily digests – as explained in Update (November 15, 2009) above – from 8th May to 15th May. This time I noticed that my server’s (on which this blog is hosted) system time has gone out of sync. Note that this wasn’t the issue during the earlier occurrences of this problem. Nevertheless, Twitter Tools should have worked as per the wrong server time. I even upgraded to Twitter Tools 2.3.1 hoping that the issue will self heal. Waited for a week, for it to work (or call me lazy 🙂 ). Finally what resurrected the daily digests is the same solution that I posted above – refer to Update (November 15, 2009). Since 16th May to till date (May 28) the daily tweets are being posted regularly.
Update (October 4, 2010): The latest version of Twitter Tools uses OAuth for authentication. This worked fine for me on WordPress 2.9.2. When I upgraded to 3.0.1, Twitter Tools stopped working. Note that the version of Twitter Tools I’m using is 2.4. Next, I followed the same steps as mentioned in Update (November 15, 2009). But this time, I faced a different issue. The authentication (the first step before setting up the plugin) kept failing saying “Authentication Failed. Please check your credentials and make sure Twitter is up and running”. After hours of troubleshooting at the code level, coincidently I happened to check my server’s time (system time). It was lagging behind by several minutes. Updated my server’s time (via ntpdate ntp.ubuntu.com) and voila! the authentication worked. Yet to see if the daily digests will start shooting up again. Will keep this space updated.
Update (October 9, 2010): With reference to Update (October 4, 2010), daily digests seem to be fixed. From October 4 to till date, daily digests are being posted regularly by Twitter Tools 🙂
Very neat indeed. Must check out what all would work for me from this, but the idea of the tags and digest does make a lot more sense than just a two-way sync.
Cheers…Kishore
—
Great solution!
With the Category Excluder, would subscribed people be emailed when a new twitter digest is posted, even though it wouldn’t appear on the home page?
Hi Wibbler,
Yes, subscribers will be emailed when a new Twitter digest is posted despite the exclusion from the home page.
Is one’s twitter password safe in such a plugin? I have found that twitter accepts both http and https login. Wonder how this plugin interacts with twitter?
Hi Jay, it seems this plugin interacts using http (plain text).
But sniffing the password from the blog site hosted on an Internet Web Server is not as easy as sniffing in a local network.
Barring the first time entry of the Twitter username and password (in the plugin settings), the Twitter credentials will travel from your Blog’s server to Twitter’s server(s) and both of them would be, typically, Internet servers.
[…] See the article here: A Perfect Integration of WordPress and Twitter | Shekhar Govindarajan’s Blog […]
Thanks for the article, i’m currently feeding my wordpress site posts to my twitter with the post title, and the url. I would like to get the category to appear on my twitter, any tips to do so?
Chris, help me understand this.
Right now Twitter Tools plugin posts a new blog post on Twitter as follows:
New blog post: [post title] [link]
What you want is to include the blog post category too, something like:
New blog post: [post title] [link] in [category]
Is that right?
Hi Shekhar,
Yes something on the lines of that, prefferably i would like on my Twitter the feeds appearing…
New [category name] post: [post title] [url]
As I have various categories feeding into my blog, It gets a bit confusing what is actually being posted without the category name. Does anyone know if this is possible?
I’d love to try your fix for getting twitter tools running. Mine’s been dead a while.
But I keep getting errors with that mysql query in phpmyadmin.
SQL query:
DELETE FROM wp_options WHERE option_name LIKE ‘aktt % ’
MySQL said:
#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘%’’ at line 1
never mind my comment, I should have known by the gibberish in the response from SQL that I needed to type that line and not copy/paste
Hey Rev. Voodoo, sorry for the delay in response (that reminds me I still need to reply to Chris).
That’s right. I have now made the line copy paste friendly. Thanks for pointing it out.
Please do let me know whether the solution worked for you
Unfortunately, it did not. My problem is that twitter tools does not bring my tweets into my sidebar, nor does it make daily digests. I have everything setup OK. I tried the procedure twice. The plugin partially works, I can post tweets from my sidebar, and my blog updates are posted to twitter….so I’m halfway there.
The tweets are stored in a table called wp_ak_twitter. Are you able to see your tweets when you do a: select * from wp_ak_twitter; ?
yup, I’ve got hundreds of tweets in there!
Check if you have your latest tweets there. If yes, Twitter Tool is able to get the tweets from Twitter. In this case, the solution I suggested should have worked.
You may also try clicking on the buttons “Update Tweets”, “Reset Tweet Checking” and “Reset Digests” in the Twitter Tools settings in the WordPress admin. Note that this did not work for me though 😉
yeah…my tweets are in the database, just not appearing within the actual widget for some reason. And my daily digest function still doesn’t work. None of those reset options do anything. hmmmm…strange eh?
[…] De cand am actualizat WP la 2.8.6, plug-ul Twitter Tools 2.0 a incetat sa mai faca “weekly digests” (bloc notes). Solutia am gasit-o aici. […]
Hey Rev. Voodoo, whats the version of Twitter Tools you are using? I’m using 2.0 and all these steps worked for me with Twitter Tools 2.0 installed on WordPress 2.8.6
Thanks for the advice on getting Twitter Tools 2.0 to work with WordPress 2.8.6 Shekhar. Worked a treat.
[…] for earlier versions of WordPress, and not the latest 2.8.6. Eventually I found one blog post by the integration between WordPress and Twitter whilst also providing a solution to the problem that I was having. I will post here what I did, […]
[…] of WordPress, and not the latest 2.8.6. Eventually I found one blog post by Shekhar Govindarajan on the integration between WordPress and Twitter whilst also providing a solution to the problem that I was having. I will post here what I did, […]
I’m using twitter tools 2.0 with WP 2.8.6, same as you it looks like! Tried running through all the steps again. Still no go
Likewise as Rev. Voodoo, although I’m TT 2.0 and WP 2.9. I tried to delete the entries from the DB table (which worked), but even after entering a fresh username and password after logging out, reactivating the plugin (installed via ftp into the wp-content/plugins dir, this still does not work. Hate to say it, but I’m going to have to let go of TT. This has happened too many times, and I know it’s hard to maintain software for free, so I don’t fault the developer, but I’ve got to move on. Thanks for the tips tho! Wish it had worked for me. I’d love to hear if anyone has finally gotten to the end of this bug.
PJM
new version of TT just came out, and fixed my problems!
Guess what, I still haven’t upgraded to Twitter Tools 2.1.1 or 2.1.2, from 2.0.
Was fearing that I may loose what I have 😉 Your comment has given me some strength.
Perhaps my weekend task is this. Thanks! Will keep everyone updated via comments on this post.
Updated Twitter Tools to version 2.1.2 on January 25th.
Waited for this long to update this post because I wanted to ensure that the daily digests of tweets are posted, regularly, as before.
It seems to be working! Expect that on January 30th, the digest got posted thrice. Besides this one of case, Twitter Tools 2.1.2 is behaving.
Excellent post!! I wish it worked for me though.. 🙁
I was on WordPress 2.8.6 and TwitterTools 2.0 when my weekly digests stopped getting posted. I upgraded to TwitterTools 2.2.1. No luck. I then upgraded to WordPress 2.9. Still no luck. Using the method you described, I uninstalled TwitterTools 2.2.1 and installed 2.0 instead. No luck.
In all, the combos I’ve tried are:
TT 2.0 + W 2.8.6
TT 2.2.1 + W 2.9.1
TT 2.0 + W 2.9.1
But my weekly digest do not get posted. Checked for my tweets in wp_ak_twitter. They’re all there..
Any suggestions?
Did you follows all the steps under Update (November 15, 2009) ? Including the step to delete the twitter tools options with SQL query “delete from wp_options where option_name like ‘aktt%’;” ?
You will be able to run a query like this using phpMyAdmin or any MySQL database tool
As like tanya25m stated… my issue is also same here… I even can’t test login.. the message “Sorry, login failed. Error message from Twitter:” oftenly shows…
please solve this issue
Hi Mark,
I never faced the problem of failed login. But as per posts across the Web, this may happen due to conflict with some other WordPress plugin.
Try the following:
1. Deactivate and reactivate the Twitter Tools plugin.
2. If 1. does not work, deactivate all other plugins and then try Twitter Tools test login.
Also let me know the version of WordPress and Twitter Tools that you are using.
This worked perfectly for me, many thanks.
Most welcome. Thanks for confirming it Jamie
thanks twitter tools fix worked like a charm.
I again faced the problem with daily digests. Refer to Update (May 28, 2010) in the blog post above.
Twitter tools were working fine so far, however, the option to tweet automatically on new posts fails since a couple of days.
Good to know: I use FeedWordPress to collect and announce existing posts.
This is what I observed:
1) My Settings – Twitter Tools Enable option to create a tweet when you post in your blog? Is set “Yes”
Tweet prefix for new blog posts: NEW
Set this on by default: Yes
Create tweets from your sidebar? I updated this to “yes”, but didn’t receive any new posts yet to verifiy if this changes behaviour, which I would doubt.
I am using WordPress 3.0.1., FeedWordPress Version 2010.0623 , Twitter Tools Version 2.4 , Twitter Tools – Hashtags Version 2.4
2) I receive the following type of fatal error log
Fatal error: Call to a member function do_blog_post_tweet() on a non-object in /home/kudutalk/kudutalk.com/wp-content/plugins/twitter-tools/twitter-tools.php on line 740
However, I am not sure (even more doubtful) that this is triggered at the moment that new posts are published.
3) I noticed that the option “Send post to Twitter” was set checked “No” on my last posts.
If I switch this to “Yes” and save, then this is tweeted correctly.
4) What has changed recently:
– I added lots of new syndication feeds for FeedWordPress
– I removed and re-installed Twitter Tools
– After this error occurred, I installed Twitter Publisher as failback (only later I noticed observation Nr 3)
Can you help?
Hi kudu,
I’m a little confused about the exact problem that you are facing.
Doesn’t this mean that your problem got solved ? Or are you still getting the Fatal Error message?
Shekhar,
thanks for replying.
I am sorry I was not so clear.
This setting on each post is now “No” for new posts. With the general option “set this in by default”, I would expect this to be “yes” for every new post.
So if I change this “no” manually to “yes”, it posts and tweets well, but it is the purpose to have this automatic.
Have I clarified this better?
Thanks!!!
I don’t know if I was clear mentioning that you may have a look at http://www.kudutalk.com to see the type of posting.
Kudu,
So you are suggesting that, by default, it should be Yes instead of No ? Fair enough.
i love to microblog that is why i am very addicted to Twit my daily activities**,
Ideal guide! I am only beginning out in marketing and marketing and attempting to learn to carry out it nicely – assets just like this write-up are extremely priceless. As our corporation is based mostly in america, it is all a bit new to us.
[…] / syncing with the server. I spent a lot of time reading online forums and found this post by Shekhar Govindarajan to be the most helpful until I found an even easier […]