This plugin posts updates to your Twitter account every time you post an entry to your blog. The text that is posted to your twitter account is configurable and will include the title of your blog post along with a link directly to the post. An optional hashtag of #b2p is also included which stands for b2evo post.
Please note: If you are using b2Evolution version 3.2.0-beta or above, this plugin is now included by default so you don’t need to download it from here. It is recommended that you use the version included with the 3.2.0+ version as this is able to make use of the new per blog settings feature of b2evolution 3.2.0-beta.
However, if you are still running a 2.4.x version of b2evolution and you want to update twitter when you post to your blog then this is the place for you. The current version is 0.5 and this is the same as the version released with b2evolution 3.2.0 but without the new features that come with 3.2.0. The name of the plugin has been changed to twitter_plugin to maintain compatibility with the new one so you will have to uninstall and remove the old plugin (_twitterlution.plugin.php) before you install this one if you had a previous version installed.
A big thank you goes to the b2evo developers that added improvements to the code when it was added to b2evolution version 3.2.0.
Download Twitterlution, upload it to your plugins folder and install it via the Global Settings tab. Read the readme file and update your settings. Post a comment here with any questions.
Subscribe: 


Great plugin ! a big Thanks, i was just looking for that !
ps: any chance to see the same kind of plugin for B2evo ----> facebook ?
A Facebook plugin is a great idea. I may look into that in the future. If you want a roundabout way of achieving the same thing you could install the Facebook Twitter app and allow it to update your Facebook status. This way, every time you post to Twitter (including from b2evo) your Facebook status will be updated.
Hi Barry
It should work fine with the admin account as far as I know. Did you also tick the box in the blog advanced properties to say 'Ping twitter.com'? You should be able to find this in Blog Settings -> Advanced for your blog.
Let me know if this helps.
Cheers
Lee
Thank you for this plugin, we will add this to our Blog: blog.hdwebprovider.com
@ Sandra - No problem at all. Glad you like it. Let me know if you have any problems.
This looks really cool. Will it work with the latest version of b2evo 2.4.6? I want to use it on my new web site.
Thanks
Hi LowCarbDiva
Yes this will work with b2evo 2.4.6. I have it running on my blogs which are mostly 2.4.6. Let me know if you need any help installing. I am in the process of updating it as well so look out for a new version soon.
Thanks
Lee
Hi Lee,
Thank you for working on this. It is well needed. Is there a chance that you can set it for the reverse where the blog is updated when Twitter is?
I'd like my blogs to be updated with my Tweets.
Please advise.
Thank you and keep up the great work.
~TITSSN~
Hi Brett
I am in the process of updating the plugin to allow a twitter widget to be displayed on the blog. This will always display the last 5, 10, 20........ tweets that you have made. I think making the plugin work the other way round would require some form of cron job that pinged the plugin at regular intervals to pull your tweets and make a post from them. Then we would need to decide if it was one post per tweet or one post for a full days worth of tweets or some other configurable amount.
Cheers
Lee
Just added this to my site.
"It should work fine with the admin account as far as I know. Did you also tick the box in the blog advanced properties to say 'Ping twitter.com'? You should be able to find this in Blog Settings -> Advanced for your blog."
It would be really helpful if that were included in the plugin settings instructions. I have spent half a day waiting for Twitter to update and didn't know about this setting.
I am sorry that you didn't find this information but it is all there in the blog post. Page 3 of the blog post is called 'Installation and Help' and can be found here:
http://leeturner.org/index.php/twitterlution?page=3
On it you will see point 4 which says 'Posting to Twitter can be turned on and off on a per blog basis in the ‘Blog settings‘ -> ‘Advanced’ tab'
The next release will have a readme file included so all this information will be bundled with the plugin. Hopefully this won't be an issue in the past.
Cheers
Lee
Many thanks for the post. Actually I haven't thought about doing it that but it sounds like it might be a useful addition. I will look into the feasibility of it as it would need to take into account all categories across all blogs. Sounds interesting though so thanks for the suggestion.
Cheers
Lee
#SugarPatch Today: 'Power and dependence: the power of choice' - http://www.sugarpatch.com//index.php/2009/04/03/power-and-dependence-th ...
Is there a way to tinyURL the links?
PS you ask me a question like what color is grass, and I so, so, so want to be a smartA$$ and put purple...
When I first started developing the plugin I thought I would have to integrate it with tinyURL myself but I soon discovered that twitter does it for you. See this tweet:
http://twitter.com/leeturner/status/1244349195
That tweet was posted from my plugin and twitter tinyURL'ed it automatically. I am not sure why this is not happening on your urls
When you say there are 404 errors is that from twitter when the plugin tries to post to it or from your blog when you click on the link in twitter after the plugin has posted to it?
I would stick with the answer 'green' to the question otherwise we won't get very far :-)
"#SugarPatch Today: 'Power and dependence: the power of choice' - http://www.sugarpatch.com//... ..."
When you click you get a 404 in tweetdeck, but not on my timeline.
Think it is just tweetdeck? Ack, don't make me give that up... I'd die!
Pssttt BLUE, the grass it blue, it really is...
That all seems a little strange. Lets do a little sanity check before we go any further. When you click on a link in tweetdeck, what url does it try to load in the browser that gives the 404 error ? Have you also tried this in any other twitter client? Twhirl for example?
In the examples you have given there always seems to be two // in your urls:
http://www.sugarpatch.com//index.php/2009/04/03/power-and-dependence-th....
Do you have any idea why this is? Just out of interest and if you have the ability to do so, can you have a look at your blogs config file /conf/_basic_config.php. In there there is a variable called $baseurl which should be assigned your domain name:
$baseurl = 'http://www.sugarpatch.com/';
If you can look in there can you tell me whether you have one or two forward slashes '/' at the end of your domain.
Cheers
Lee
I have made the blog post a single post to make things easier for people. Hope that helps.
Cheers
Lee
It sounds like your host hasn't enabled curl which is used to connect to twitter. We can check this out by running the phpinfo() command. The easiest way to do this is to create a new text file and copy the following into it:
<?php
phpinfo();
?>
Save this file as phpinfo.php and upload it to the root of your host. You can then go to your browser and load http://www.thepinkladyshop.com/phpinfo.php and see what php libraries you have loaded. Somewhere at the bottom of the page that is loaded I have:
CURL support: enabled
CURL Information: libcurl/7.15.3 OpenSSL/0.9.7a zlib/1.2.3
Do you have anything similar?
Cheers
Lee
I can't fine CURL function
Can you looking for me?
Thanks,
Tangkua
As for the request for Facebook, you can already link any RSS feed to Facebook. It's built in to facebook.
I have just checked out your phpinfo and I can't find the curl information anywhere in there so it looks like I was right before when I said that your host has not enabled/included this in your php distribution.
I am not sure there is anything else I can do to help with this one but I would definitely contact your host and ask them if you can have it installed/enabled. It will be worth asking and seeing what they say.
Cheers
Lee
Thanks for your comment. Very true on the Facebook thing. I am also looking at developing a ping.fm plugin to all a load of social networks to be updated from b2evolution.
Cheers
Lee
I've just installed and followed all instructions as well as read all the posts, yet when i posted a new blog after 2 hours it has not appeared on Twitter. Any ideas?? Cheers
No ideas off the top of my head. If you have entered your twitter username and password in your user profile and ticked to enable the post to twitter in your blog advanced settings then it should go through. When you post a blog entry what information is displayed about the pings? Do you get a 'Pinging Twitter Failed' or 'Pinging Twitter Success' message?
Cheers
Lee
blog: http://maxhedrm.montebellopark.com/blog/
twitter: http://twitter.com/maxhedrm
Is there any way to troubleshoot this?
What 'ping' messages do you get displayed when you post a message ? Can you copy and paste them here?
Also, are you certain that you have enabled the post to twitter in your blogs advanced properties. As this is in effect a 'ping' plugin b2evolution requires the checkbox to be ticked in the advanced settings also.
Cheers
Lee
I'm having the problem with 404s also reported above - the plugin is no longer using tinyURL to shorten URLs of posts.
Where can I correct this in the code, or use another URL shortening service?
Thanks
Robert
I still don't really know why this is happening. The plugin has never shortened any urls as twitter does this automatically. As a result, there is nowhere in the code for the plugin that does the url shortening to 'fix' it. The plugin itself is pretty simple - just gather the title of the post and the direct url to it and post it to twitter. It doesn't try to be any more complicated than that.
Do you know why the 404 is happening? What is wrong with the url that the browser is trying to load for the 404 to occur. Is some of it missing? Can you give any examples ?
Cheers
Lee
Aha. The reason for the 404 is that the end of the URL is missing. Twitter has not tried to shorten it at all and it's simply too long for the post, causing it to be truncated.
Maybe it'd be a good idea to add URL shortening to the plug-in as this doesn't appear to be automatic anymore...?
Regards
Robert
Yeah, I think you are right, twitter doesn't seem to be shortening the urls anymore. Although this must be a recent thing as there are people out there using the plugin that have had urls shortened a few days ago:
http://twitter.com/Muzachan/status/1593574338
I will look into adding support for url shortening soon to try and sort the problem out.
Cheers
Lee
As an alternative to tinyURL you may want to look at this: http://is.gd/api_info.php ... Twhirl and other Twitter clients seem to be using this to good effect.
Looking forward to a shiny plug-in update when you have found the time! Thanks for looking at this.
Regards
Robert
Thanks for that. I'll look into it. I have also been using cli.gs for a little while so maybe a list of different url shorteners is called for :-) Cli.gs has an api too:
http://blog.cli.gs/api
Thanks for taking the time to try the plugin and for taking the time to comment on the the blog
Cheers
Lee
No worries... This, by the way, seems to be working ok:
$url = "http://is.gd/api.php?longurl=";
$testurl = "http://www.robertturrall.com/blogs/index.php/2009/04/27/shhh-the-internet-is-bugged?blog=2";
$url .= urlencode($testurl);
$session = curl_init();
curl_setopt ( $session, CURLOPT_URL, $url );
curl_setopt ( $session, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt ( $session, CURLOPT_RETURNTRANSFER, 1 );
$result = curl_exec ( $session );
curl_close( $session );
// check for success or failure
if (empty($result)) {
echo $result;
} else {
echo $result;
}
I'll probably hack my copy of your plug-in but will replace it with a new version once it's ready, to keep my install tidy ;-)
Thanks for the useful plug-in!
Regards
Robert
Thanks for the code. It is always nice when people submit patches. I'll get a new version out as soon as I can.
Cheers
Lee
www.twitter.com/rpwhite3
Interesting, works for me lately though, wanted to drop you a line saying this is great, thanks for the hard work!
Rp
Thanks for the comments and kind words. Jen, the next version will hopefully have a sidebar widget and I am hoping to get onto this new version asap.
Rp, I am really confused as to what criteria Twitter uses to determine which urls to shorten and which to not. The next release will have built in url shortening to get around this.
Cheers
Lee
Keep up the good work! Your plugin is fantastic. I am a big fan of it.
Long time no speak. It could well be due to the change in the core. I have yet to install the latest b2evo on my dev site so I haven't tested it all yet. I will get round to installing it asap and let you know what I find.
Cheers
Lee
Cheers!
I'm using b2evo 2.4.6 and twitterlution 0.4 on OS X Leopard Server.
Did I miss something?
Thanks.
As far as I can tell you haven't missed anything. Other than checking that your twitter username and password are correct it should update twitter. I will try and get better error reporting in the next release of the plugin to help diagnose problems better.
Lee
One question which may turn into a suggestion: I'd like to be able to only send to Twitter those posts which I think my Twitter "followers" would be most interested in. For example, I want to send out political notes, but not necessarily personal notes or funny stuff.
Is there a way in "rendering" or any other way to select on a post-by-post basis whether to send the tweet? I've tried changing rendering to "opt-out" but I couldn't see a change on the blog writing form where I could select to tweet or not to tweet.
If that option isn't currently available, then that's my suggestion!
Thanks again,
Ross
Thanks again,
Ross
There isn't currently a way to specify which posts are sent through to twitter and which ones aren't. I have looked into this before and it isn't as easy as it sounds. It could maybe based on categories where only posts in certain categories are sent through to twitter.
Also if you post date a post I don't think that a tweet will be sent out when it is published. This is nothing to do with the plugin but just the way b2evo works.
Have you managed to get it all working yet? Have you checked your twitter user credentials and ticked the checkbox in the Blog Settings -> Advanced tab ?
Cheers
Lee
Just installed it.
When I use it on a Multiuser blog it will only send to twitter the posts from users that have added their twitter details, no?
Thanks for commenting on my blog. You are right in your assumption about the plugin. Only users who have entered their twitter details will have their posts sent through to twitter.
Lee
Thanks a million
i'm part of the admin group.
The username and password is set on a per user basis so it is in your user profile settings. In the later versions of b2evo (3.2 onwards I think) where the plugin is included in the distribution you can also set the username and password on a per blog basis. This uses the new per blog plugin settings.
Hope that helps
Lee
If you can a free time please, test it for me. At http://www.blogtika.com
Thank for plugin
Can you give anymore information about what the problem is ?
Cheers
Lee
- So i uninstall plugin and install it again.
- When i test again, first post not post on twitter. Second post not post on twitter but after third it can show on twitter. You know why?
- So i'm thinking if somebody has new install b2evo 3.3.1 or > should install new for twitter plugin.
- If you can test that maybe confirm my story.
Managerblue - if you didn't change any of the settings between the second and third posts then I am not sure it is to do with the plugin itself. The problem with this type of plugin is that there are so many external factors that may determine whether it works or not. Twitter could have been having problems during your first and second posts for example.
Are you still getting intermittent problems or is it working all the time now.
Lee
I'm fairly new to using blogging systems and twitter.
I'm using version 3.3.1, I have the inserted the details into the blog plugin settings, I've also entered the details within my own user account and enabled the ping settings for the blog.
I've tested with a few blog posts, and it replies;
Pinging twitter.com...
Post has been created.
But there's no update to twitter.
FYI
curl
cURL support enabled
cURL Information libcurl/7.19.5 OpenSSL/0.9.7a zlib/1.2.3 libidn/0.5.6
I've also tried removing the plugin and replacing with the one from the CVS repo to no avail
I'd be grateful if you could suggest what i could look at.
Cheers
Gav
Sorry for the delay in getting back to you. Have you managed to get this sorted yet? I know Twitter had a few api issues recently so that could have been the cause of the problem. It sounds like you have set all the settings correctly so other than entering your username and password again (just to make sure) I am not sure what the problem could be.
Lee
It appears that it must have been a bug in the api as you suggested as it's now posting to the twitter account.
Love the plugin....I just installed it last night and thought it would be nice if I could use short URLS in it.
So I added a function to use bit.ly to shorten the url. Thought I would share with you here, take a look at http://bit.ly/5LjWnz for the high level changes.
If you want the updated source, send me a note and I will send it to you.
Thanks again for a great plugin,
Dave
Really pleased you like the plugin
And a huge thanks for taking the time to add the changes to it. Would love to get a copy of the updated sources so will email you about that.
Cheers
Lee
there is a way to make the Title of the post linkable, and not add the entire url on the tweet?
Thanks
Twitter does not allow text to be made into links inside a tweet so this is not possible from the twitter end.
Lee