Wordpress Twitter Widget
My latest plugin is a sidebar widget that handles Twitter feeds. It’s true that you could just point an RSS widget at one of the Twitter feeds, but you end up with the whole tweet as a link, @replies don’t function, etc. Twitter Widget Pro properly handles twitter feeds, including @username and link parsing, allowing you to display your twitter profile image, and even allowing you to specify a custom error message to display when Twitter is down. Twitter limits the number of requests that you can make per hour, but you don’t need to worry about this with Twitter Widget Pro. It includes caching so it only polls twitter once every 5 minutes.
Twitter Widget Pro also uses the WordPress multi-widget pattern, similar to the RSS and text widgets, so you can have as many of as you want on your sidebars. I tried to make everything easy to style, so there are no built-in styles. If you don’t know exactly what you need, here is a good place to start:
/**
* Twitter Widget
*/
.widget_twitter li {
clear:both;
}
.widget_twitter li img {
float:left;
margin-right:.5em;
}
.widget_twitter li .clear {
clear:both;
}
Unfortunately, version 1.2.1 included the removal of the “friends feed” option. It seems that twitter discontinued it’s friends feeds because the database query that Twitter had to run to retrieve these feeds was contributing to their constant crashes (enter the fail whale). They have removed this functionality, and have no immediate plans to add it back. If they ever do, I’ll redo the plugin to use it. I’m sorry, but it’s completely out of my hands.
version 1.2.1 also included the addition of optional anonymous statistics collection. As my plugins are getting more and more popular (1000s of users now), I’m struggling to keep in touch with my plugin users. Gathering some statistics will help me to design my plugins to meet the needs of the users. This is not meant as an invasion of privacy, and you can easily disable it from the options page.
Here is the data it collects and sends:
- Plugin Name
- I plan to eventually add this to more of my plugins, so this is used for me to tell sort the data by plugin.
- Unique identifier
- This is a hash (one way encryption) of the URL and a random number. This simply helps eliminate duplicate info from being added to the pool of data.
- Plugin Version
- Just the version of the plugin.
- PHP Version
- Most of my plugins require PHP 5+, but not all of them and I would like to update the ones that don’t. I’m hoping to see how many users are on an old version of PHP.
- MySQL Version
- Certain database queries can be vastly optimized on newer versions of MySQL, so this information could be very helpful.
- Server Software
- Microsofts IIS can cause a lot of problems for PHP applications, so knowing how many users are using IIS is important.
- Memory Limit
- Your web server puts a limit on the amount of memory a script can use. This plugin should never come close to an average memory limit, but this is a statistic that will be nice to keep in mind as new plugins are developed.
For those that want to know, here is the code that collects the data:
$s['plugin'] = 'Twitter Widget Pro';
$s['id'] = $this->get_id();
$s['version'] = TWP_VERSION;
$s['php_version'] = phpversion();
$s['mysql_version'] = @mysql_get_server_info($wpdb->dbh);
$s['server_software'] = $_SERVER["SERVER_SOFTWARE"];
$s['memory_limit'] = ini_get('memory_limit');
Changelog
- 04/23/2008: 1.3.0
-
- Updated to use HTTP class and phased out Snoopy
- No longer relies on user having a caching solution in place. Caches for 5 minutes using blog options
- Allow HTML in title and error message if user can
- 04/23/2008: 1.2.2
-
- Fixed minor issue with Zend JSON Decoder
- Added an option for Twitter timeout. 2 seconds wasn’t enough for some people
- 04/23/2008: 1.2.1
-
- Fixed some minor errors in the collection code
- Added the admin options page (how did that get missed?!?)
- 04/23/2008: 1.2.0
-
- Removed friends feed option, twitter removed this functionality
- Added an option to set your own message to display when twitter is down
- Added optional anonymous statistics collection
- 04/23/2008: 1.1.4
-
- Added an error if there was a problem connecting to Twitter
- Added some text if there are no tweets
- 04/23/2008: 1.1.3
-
- Fixed validation problems if source is a link containg an &
- 04/23/2008: 1.1.2
-
- Title link always links to correct username, rather than the last person to tweet on that feed
- Added option to hide RSS icon/link
- 04/23/2008: 1.1.1
-
- Fixed issue with @username parsing of two names with one space between them (@test @ing)
- Fixed readme typo
- 04/23/2008: 1.1.0
-
- Most major fix is the inclusion of json_decode.php for users that don’t have json_decode() which was added in PHP 5.2.0
- Fixed problem with displaying a useless li when profile images aren’t displayed on a single user widget
- Default title is now set to “Twitter: UserName”
- 04/17/2008: 1.0.0
-
- Released to wordpress.org repository
- 04/14/2008: 0.0.3
-
- Fixed some of the settings used with Snoopy
- Set a read timeout for fetching the files
- 04/14/2008: Version 0.0.2
-
- Changed some function names
- Moved form display to a separate function (_showForm)
- Now uses wp_parse_args to handle defaults
- Added comments to the code
- Added seconds to the _timeSince function so you can have something like “about 25 seconds ago”
Related Posts:
295 Responses to “Wordpress Twitter Widget”
Leave a Reply
Pings/Trackbacks
-
[...] Un widget Twitter pour WordPress. [...]
-
[...] Wordpress Twitter Widget [...]
-
[...] Plugin: Wordpress Twitter Widget. I don’t use the twitter. Buy maybe I will. Althought I can post right here with [...]
-
[...] Twitter Widget Pro — тот, что я использую (не без небольших поправок в коде). Принцип работы сож с предыдущим, однако этот имеет чуть больше настроек, позволяя, например, отображать не только ваши твиты, но и тех, на кого вы подписаны. Существует защита для случаев недоступности сайта (будет выводиться соответствующее сообщение, а также он распознает «@-ответы», ставя ссылку на адресата. Мои правки заключаются в том, что я локализовал вывод времени, убрал сведения о клиенте (их можно вернуть) и добавил пару дивов для того, чтобы настроить внешний вид под себя. Если вам он вдруг понадобится (моя версия), то обращайтесь. [...]
-
[...] Twitter Widget Pro [...]
-
[...] Twitter Widget Pro : A widget that properly handles twitter feeds, including @username and link parsing. Feeds can be for a single user, or can include all their friends’ tweets as well (like their Twitter home page does). It supports displaying profiles images, and even lets you control whether to display the time and date of a tweet or how log ago it happened. [...]
-
[...] it did. The plugins that finally got my setup here are Twitter Updater and Twitter Widget Pro. Took a while to find plugins that were 2.5.1 compatible but these do the [...]
-
[...] Twitter auch einen gebührenden Platz auf dem Blog bekommt, wird fix das Twitter Widget Pro installiert. Schon gibts die Tweets schön im Sidebar, mit RSS [...]
-
[...] mit dem Blog Freiheitsfreund verwoben. Beiderseitig. Dank der Wordpress-Plugins Twitter-Updater und Twitter Widget Pro. Scheint zu funktionieren soweit. Ach wie klasse es doch ist, sein Wordpress selbst zu [...]
-
[...] berichtet. Allerdings sind sowohl die dort von mir genannten Twitter updater als auch Twitter widget pro wieder [...]
-
[...] Wordpress Twitter Widget En widget för Wordpress som visar dina och dina kontakters tweets på din [...]
-
[...] recently installed the Twitter Widget Pro (originally built at Xavysis) on the site, and realized it didn’t cache the twitter feed for more than a few seconds. [...]
-
[...] Twitter Widget Pro – A widget that properly handles twitter feeds, including @username and link parsing, and can even display profile images for the users. Requires PHP5. [...]
-
[...] WordPress blog. You can pick and choose when Plurks are sent and what text is passed along with it. Twitter Widget Pro Displays your twitter feeds on your blog, including @username and link parsing, feeds that include [...]
-
[...] WordPress Twitter Widget – Displays your Twitter feed in your sidebar and can turn “@username” and other info into links, while also displaying user avatars. [...]
-
[...] WordPress Twitter Widget – Displays your Twitter feed in your sidebar and can turn “@username” and other info into links, while also displaying user avatars. [...]
-
[...] WordPress Twitter Widget – Displays your Twitter feed in your sidebar and can turn “@username” and other info into links, while also displaying user avatars. [...]
-
[...] WordPress Twitter Widget – Affiche votre feed Twitter sur votre sidebar et peut transformer un “@username” et autres infos en liens (affiche également les avatars ). [...]
-
[...] WordPress Twitter Widget [...]
-
[...] dem Wordpress Twitter Widget von Xavisys lassen sich Twitterfeeds praktisch in den eigenen Blog (in die Sidebar) einbauen. Das [...]
-
[...] Wordpress Twitter Widget Clean and simple Twitter widget for the WordPress sidebar. [...]
-
[...] WordPress Twitter Widget [...]
-
[...] Wordpress Twitter Widget Clean and simple Twitter widget for the WordPress sidebar. [...]
-
[...] Twitter Widget Pro – This twitter plugin is a sidebar widget that handles Twitter feeds. It’s true that you could just point and RSS widget at one of the Twitter feeds, but you end up with the whole tweet as a link, @replies don’t function, etc. Twitter Widget Pro properly handles twitter feeds, including @username and link parsing, feeds that include friends or just one user, and can even display profile images for the users. It’s set up like the RSS widgets, so you can have as many of as you want on your sidebars. [...]
-
[...] WordPress Twitter Widget [...]
-
[...] Twitter Wordpress Widget: another Twitter widget plug-in. [...]
-
[...] WordPress Twitter Widget [...]
-
[...] Wordpress Twitter Widget is a sidebar widget for your Twitter feeds. Pretty cool. [...]
-
[...] Twitter Widget Pro – A Wordpress plugin that properly handles twitter feeds, including @username and link parsing, feeds that include friends or just one user, and can even display profile images for the users. It’s set up like the RSS widgets, so you can have as many of as you want on your sidebars. [...]
-
[...] to start this blog off than to show a quick fix I had to do while setting this up? I installed the Wordpress Twitter Widget shortly after setting up WordPress. In my twitter sidebar, there was a link, http://➡.ws/㭎 [...]
-
[...] Twitter Widget Pro by Aaron Campbell. [...]
-
[...] Add Twitter feeds to your WordPress blog, including friends, profile images, & link parsing Download: http://xavisys.com/2008/04/wordpress-twitter-widget/ [...]
-
[...] Xavisys, the web development company behind WebDevNews.net, has created a Twitter feed module for WordPress called WordPress Twitter Widget Pro. [...]
-
[...] Twitter Widget Pro – En widget som hanterar ert Twitterflöde på ett snyggt sätt. @användarnamn plus länk inkluderas. Det finns också support för att visa bilder ifrån Twitterprofiler och ni kan även hantera och administrera om ni vill visa tiden eller datum för en Tweet. Systemkrav är dock PHP5. Läs mer här. [...]
-
[...] them, rather than lose them altogether, when you remove them from a sidebar. As you can see, the WordPress Twitter Widget Pro widget is fully configured and ready to be dropped back into any one of the widget-ready spots on [...]
-
[...] Twitter Widget Pro [...]
-
[...] 4) Twitter Widget Pro at http://xavisys.com/2008/04/wordpress-twitter-widget/ [...]
-
[...] Twitter Widget Pro von Aaron D. Campbell kann Twitter Feeds in einem WordPress Blog anzeigen. Es können beliebig [...]
-
[...] muchos Pluguins para hacer esto en WordPress, pero de los que he provado te recomiendo WordPress Twitter Widged podeis ver como funciona en este mismo blog. Parece bastante solido y te rastrea las url para crear [...]
-
[...] muchos Pluguins para hacer esto en WordPress, pero de los que he provado te recomiendo WordPress Twitter Widged podeis ver como funciona en este mismo blog. Parece bastante solido y te rastrea las url para crear [...]
-
[...] Powered by WordPress Twitter Widget Pro [...]
-
[...] (noch) keinen Twitter Account hat, kann hier auf meiner Website dank eines schönen WordPress Widget trotzdem mein aktuellen Twiter Postings [...]
-
[...] least 20 in the WordPress website, and who knows how many more elsewhere on the Web. I settled on Twitter Widget Pro by Aaron D. Campbell, but after installing it I got a fatal error message, so I went to the [...]
-
[...] Twitter Widget – You’re on Twitter….right? Well if you are and you have a Wordpress blog you know that the widgets that they have suck. This plugin gives you a widget that will match your theme and allow your readers to see what you have been talking about on Twitter. [...]
-
[...] main plugin for a specific purpose, to encourage the community to get behind it. For example, maybe Twitter Widget Pro would be chosen for handling Twitter feeds. Since the plugin is marketed by WordPress as the [...]
-
[...] Twitter Wordpress Widget: another Twitter widget plug-in. [...]
-
[...] widget que se encarga de los feeds de Twitter de la manera adecuada, incluyendo los nombres de usuario y los hashtags. También incluye la [...]
-
[...] 1. twitter widget pro [...]
-
[...] 1. twitter widget pro [...]
-
[...] 1. twitter widget pro [...]
-
[...] Widget para exibir seus tweet’s com algumas opções como replies etc. Wordpress Twitter Widget [...]
-
[...] the original post here: Wordpress Twitter Widget Share and [...]
-
[...] Gallery, Enhanced WP-ContactForm, Google XML Sitemaps, One Click Plugin Updater, Shadowbox JS, Twitter Widget Pro, wp-cache, WP-Cumulus & WP Widget [...]
-
[...] 1. twitter widget pro [...]
I’m looking for a WP twitter plugin at the moment, and ended here. Two questions:
1. Seeing how twitter is frequently down, does your plugin have some sort of caching device, in order not to slow down the loading of the page(s)?
2. I don’t want to use it as a widget. Any way to have good old tags instead?
Hi, a short suggestion: It would be great NOT to show any @-replies I’ve made to other people in the widget. The following line does the job:
foreach ($tweets as $tweet) {
if (!empty($tweet->in_reply_to_screen_name)) { continue; } // ADDED THIS LINE
$tweet->ago = $this->_timeSince(strtotime($tweet->created_at), $options[$number]['showts']);
Maybe you can include it in the plugin and make it available as a configuration option?
Ok, thanks for your swift answers.
Hi Aaron, I’m a WP newbie. I added your Twitter widget and my host has php v 5.2.5. Two questions:
1. I see * Replace @username with a link to that twitter user
Is this right:?
sprintf(’http://twitter.com/statuses/%1$s_timeline/%2$s.%3$s%4$s’,$widgetOptions['feed'], $widgetOptions['oraclejulio'], $type, $count);
Are there any other places where I need to make changes?
2. I’m new to themes too. Your pluging was activated, but how do I add it to my right nav like you did?
Thanks @oraclejulio
Julio:
Those are things it does, not things you need to do. On twitter if you add a tweet, and put @aaroncampbell in it, it will link to my Twitter page. This widget does that too. It replaces @_____ with a link to that user on Twitter.
To add it to your sidebar, go to the admin section, then go to Design then Widgets. You will see it listed there, and can add it to an widgetized are of your theme.
When I try to use the widget in my WP 2.5 install (with php5) it blocks out the “save changes” button. However, I think when I first activated it it let me save changes, because now my sidebar doesn’t load properly when I try to pull up my site. So, I know it’s doing something. However, I’ve turned off the plugin so my sidebar will load properly. Not sure what is up, but wanted to let you know about it. Thanks!
ThePete: I sent you an E-Mail.
Hi Aaron. Finally, a Twitter plugin that lets me show my friend’s feeds as well. I am excited to get this working. I have hit a snag though. I am running off of Wordpress 2.5 and when I install/configure the widget, I get this error on my sidebar where it is supposed to appear.
Fatal error: Call to undefined function json_decode() in /var/www/mist/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 58
I checked that line, and even deleted the function, but it just led to more errors. Any insight you may have will be great. Thanks in advance!
Joshua: It seems that json_decode was not introduced until PHP 5.2.0. While I always recommend that you use PHP 5.2+ if possible, I have submitted a new version to the repository, which has a workaround using a modified version of ZendFramework’s Zend_Json_Decoder. PHP 5+ will still be required. It should be available from the wordpress.org repository in about 15 minutes, and is version 1.1.0. Let me know hoe it goes.
Works flawlessly, Aaron! Thanks so much, keep up the good work!
Hi Joshua.
I’m new to Twitter and trying to simplify as much as possible, so I’m excited that i found your plugin.
I installed it and got this message:
Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /xxx/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 69
I am running the blog on MySQL 5.0
Thanks.
Clesha
Clesha: It looks like you have PHP4 and PHP 5+ is a system requirement for the plugin.
I would just like to know how to remove the rss button and make it look more clean on the site.
Hey – cool plug-in but I might have a bug for you to look into.
When you publish a Twitter feed in a sidebar the main title (which is an optional feed title setting) it adopts the URL of the latest Twitter that has commented on the profile and does not carry the URL of the main account
Example – in your blog – the left side bar has the Twitter feed of Kevin Rose. The RSS feed icon has the correct link [http://twitter.com/statuses/friends_timeline/kevinrose.rss] BUT the title ‘Kevin Rose’ should have [http://twitter.com/kevinrose] but as of my posting this comment it has the URL of MELKINK http://twitter.com/MelKirk which was incidentally the latest twitter on Kevin Rose’s account.
This bug is replicated on my blog as well. any way to work around this bug
Teeth Maestro:
You are absolutely right, I’ve added this bug to my list of things to do, and will try to get it fixed as soon as possible. Your plugins page should let you know when the new version is available.
I just uploaded version 1.1.2, which fixes the bug that Teeth Maestro found, and adds the option to hides the RSS icon as per request from Joshua Decosta. the new version should be available from the wordpress.org repository in about 15 minutes.
Please let me know if you find any other bugs!
Hi.. thanks a lot.. i am searching for this plugin for a long time.. But as i new to wordpress i dont know how to show profile picture in tweets.. i inserted the css that you provided in my default theme stylesheet.. but it doesnt works.. can you instruct me how to make it happen..
Raj: The CSS is really just to help you on your way to positioning the images properly, after they are enabled. To enable them, there is an option in the widget control. It’s a checkbox labeled “Show Profile Image(s)” and all you have to do is check it, and save your changes using the “Save Changes” button.
Thank you so much Campbell.. I checked that option in my widget and it works fine.. Other doubt, How can I call the twitter function from a page without activating in sidebar..
Raj: That’s on the todo list, but it’s not really set up for that yet.
I get a similar error as one of your earlier commenters, however, your response is that the server isn’t running PHP5. I do host with a company that offers both 4 and 5, and I still get the error. Is there something I’m not doing correctly?
Nvm, I’m dumb. I found it.
Same yaar.. For a long time..
Hey, I started using your plugin when Twitter.com was down, so it didn’t behave the best, so I hacked it a bit to add in a “Twitter could not be contacted” error message.
I changed a section in _parsefeed() to:
// Failed to fetch url;//return array();
// Error message bubble-up
return array("urlerror" => "Could not contact Twitter");
and in display() :
echo $before_title . $options[$number]['title'] . $after_title;?>
<?php
//Display error message if there was a timeout:
if(array_key_exists("urlerror", $tweets))
{
echo $tweets["urlerror"];
// Zero-out the array so the logic below works.
$tweets = array();
}
if ( $options[$number]['feed'] == 'user' && !empty($tweets) && $options[$number]['avatar']) {
Some of your code left in above and below for context. This gives a more user-friendly message, rather than just showing no Tweets! Hope you’ll consider using this in the next version.
Thanks Andy. I’ll probably go about it slightly differently, but I’ll make sure to have an error in the next version. Look for it tomorrow!
Some error reporting has been added. It will say ‘Could not connect to Twitter’ if it couldn’t connect, and ‘No Tweets Available’ if there weren’t any tweets.
Hello I love this plugin but I have a problem with the time/date stamp. Everything shows on my blog as posted on December 31st, 6:59:59 1969
When I go to twitter manually the time is correct. My posts on my blog are correct. I can’t figure out where that time is being pulled from.
Any ideas?
Hi Aaron, I am having the same problem as Aengus where the time/date stamp is displaying December 31st, 6:59:59 1969. Were you able to figure out what was causing that? I am using PHP 5.0.4 as well.
Thanks,
Aengus: I haven’t seen that happen. Could you send me a link to the site?
Thanks for getting a look. I don’t know its your plugin’s behavior at all, I cant figure out where this date is coming from.
http://www.flaxpond.net
Aengus: it looks like strtotime() can’t convert the time it’s getting from Twitter. However, I can add your feed to my test site fine. Your host says you’re running PHP 5.0.4, do you have any idea what your locale is set to? Maybe it doesn’t understand the date from twitter because it’s in English (”May” etc) and your PHP is set to something else? If you could find out, I’d appreciate it.
I got a response from my hosting company. Here it is.
———————————————-
UTF-8 multi language for better support of all possible characters
This widget needs three things to make it perfect:
1) Automatic reconnect attempts of the twitter feed after a failed connection to update the widget. (If this already happens, perhaps a means of adjusting how often it checks from the config page.)
2) Personalized (customizable) connection error message that can be setup on the widget config page when the plugin can’t retrieve the twitter feed.
3) Functional fail-over to a local cache of the most recent successful tweet. (If already present, it is not working.)
Otherwise this plugin/widget is GREAT! Thanks for all your work! Your efforts are greatly appreciated.
I just installed your plugin (have been searching for a better twitter client due to all of the downtime that twitter has been having). I did an RSS feed of my own which works ok.
Now trying your plugin, I get the “Could not connect to TWitterr” even though twitter is up.
Any thoughts on this? Looks like a nice plugin though.
Hmm… This isn’t saving when I hit “save changes”; all of the parameters go back to being empty.
Never mind, I see it requires WP 2.5…
Hi… the plugin couldn’t be activated because it triggered a fatal error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/dlc/public_html/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 82
I’m using PHP 5.2 by the way. Please help. Thanks.
Dulce: That error should only occur if you are trying to run it using PHP 4.x rather than PHP 5.x
Make sure that PHP 5 is actually parsing your PHP documents. You can echo out the PHP_VERSION constant, or create a php file called “phpinfo.php” and put in it:
< ?php phpinfo(); ?>Then open that file from a web browser to see all sorts of stats about your PHP installation. If you find you are running PHP 5, contact me and send me a link to the phpinfo.php file.
Is it possible to get this plugin working with the sidebar manager of K2? I’m still trying to figure it out, put it seems that I have to change the Twitter Widget code.
Presume you’re aware the friends_timeline has been hit? See: http://www.slobokan.com/archives/2008/06/01/adding-fuel-to-the-fire/
Great tool btw!
@HighTechDad: For the “Could not connect to TWitterr” problem – the plugin does not work as long as you have “Protect my updates” enabled….
Great Widjet!
It automatically blended with my custom theme. Thanks a bunch!
I tried to install but when I activated it I got this error message:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /var/www/vhosts/faith-journey.com/httpdocs/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 82
Any ideas?
Paul: That error occurs when you are trying to run this plugin using PHP 4.x rather than PHP 5.x (which is requires). Please versify that you have PHP 5
The plugin is working fine for me when I have it set to “Just User,” but when I switch to “With Friends,” I get the “Could not connect to Twitter” function. Any idea what’s going on?
Ryan: Unfortunately, yes I do. Twitter has removed that functionality. a new version of the plugin is in the works that will remove this option. Unfortunately, with my schedule it will probably be a little while.
I guess adding user/pw authentication is out of the question?
Steve: Actually, it’s on the TODO list, but was outside the scope of what I could get done in the timeframe I had to work on it. Hopefully it will make it in the next update.
Hi Aaron, Looks like a great update and I have no problem sharing the usage data to assist you.
Was wondering if you could give me a pointer though. I want to customize the CSS so the text of my tweets are white and so that the hypertext-linked content is italicized. I can do that on my own, if you could give me the classes I might need.
Thanks again!
Dave Zatz: Thanks! Here is the info you need:
So, you can use something like:
.widget_twitter .entry-content {color:#FFF;
}
.widget_twitter .entry-content a{
font-style:italic;
}
If you find that these css styles are being overwritten by more specific ones, you can always add additional steps in there like:
.widget_twitter ul li span.entry-content {color:#FFF;
}
.widget_twitter ul li span.entry-content a{
font-style:italic;
}
Awesome, I’m making progress now. If you’re taking requests, I’d like the option to unlink the title from my Twitter URL and I’d the option to not display the source of my Tweet. I have limited space and I don’t know that it’s useful info. Thanks again!
I love the idea of using Twitter on a regular basis on my wp political blogs.
A. I’m having a hard time, since I don’t know diddly about backend work, getting your widget to display after being uploaded to the plugin file. I can use help there.
B. Once you help me get past that simple, I’m sure it’s simple, roadblock is it possible to configure to have the Tweet as a main page, rather than sidebar, post?
You may contact me directly if you wish. I may have some work for you.
Thanks in advance for the time and effort.
Is there a way to just include this plugin in the template page instead of using a widget? Love it’s functionality but need to be able to just plug it in without using it as a widget.
Any help on that?
cheers
josh
Josh Lee: It’s on the TODO list, but with the way work has been, it might be a little while.
ok np. Will keep checking.
Hi-
I’m getting “Could not connect to Twitter” on my Twitter feed, even though my feed is not protected. I see on the top of your own web page (http://xavisys.com/wordpress-twitter-widget/) that your Twitter feed is also displaying the same message.
Do you know if Twitter is blocking access to their site using whatever update method your plugin uses?
Thx!
I retract my last note – it now seems to be working on my site and your site. I’ll chalk that up to typical Twitter flakiness.
Thx for a great plugin!
Hi, I get the following error message when I activate the plugin:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /var/www/vhosts/faith-journey.com/httpdocs/wp-content/plugins/twitter-widget-pro 3/wp-twitter-widget.php on line 93
Thanks for your help
I use PHP Version 5.1.4-Debian-0.1~sarge1
and could intall the extension without a problem. But the widget either tells me Twitter is down (when it is not) or shows the following error where the widget should be:
Fatal error: Class ‘Zend_Json_Exception’ not found in /hp/af/ac/jw/www/iestankov/blog/wp-content/plugins/twitter-widget-pro/json_decode.php on line 321
The functionality of the widget seems to be perfect, so I really would appreciate some help in getting it to work!
IES: I fixed the Fatal error, and added an option to increase the timeout when trying to reach Twitter. The default is 2 seconds, but if you have a slower connection to Twitter, or if Twitter is running slowly, that might not be enough. I just uploaded version 1.2.2, so it should be available in about 15 minutes.
Hello,
Is there a way to use this widget without using the native Wordpress Widget Interface ? I want to to call it from my sidebar.php file. I hate using widgets because very little customization options are available.
Dan: Unfortunately there is not. I have plans to add that in the future, but haven’t had time to work on any of my plugins recently because I’ve been too busy with work.
Heya!
I know this is a rather daft question, but is it possible to not link the title to my twitter page? Also I would like to custimize the css of the title, is that possible?
Cheers, Cliff.
Cliff: You can’t currently set where the title links. However, you can easily style everything in it just by adding CSS styles to your main style sheet. Here is the info you need:
So you can use something like:
.widgettitle {/* Your styles here */
}
Perfect, thanks a lot!!
Cheers, Cliff.
Is it possible to have this plugin not display where each tweet is coming from? I don’t want it to display “from web” or “from Facebook” because it just looks sloppy. It’s inconsistent as to where the location is going to show up. Sometimes it’s before the text in the tweet (”for web”), and sometimes its after it on a new line (”from Facebook”). I just want to clean up the appearance.
justelise: Not as of now. You could hide the time and “from” using CSS:
.widget_twitter .entry-meta {display:none;
}
However, the from _____ line always appears in the same place. The only reason it should go to another line is if the phrase is too long.
This is a great plug in
So I’m trying the plugin on a new wordpress 2.5 blog with php 2.5.6, but it always says that twitter is down, even thought it isn’t, and the plugin seems to be connecting fine on your own page. Any ideas?
I meant to say wp 2.6. Whoops.
Hey,
have the same time stamp problem. Always 11:59:59 PM December 31, 1969
I even wasn’t born that time
Any solution?
Aaron, I have successfully activated the plug-in on wp 2.5.1. I am somewhat new to wp & blog coding (I don’t know CSS), but can get around ok with a little help. How do I get the plugin to show up on the right side bar? I looked over the site first, but didn’t see an answer. Or is there any type of online user guide? Thanks! Tony
Winston Salem Foreclosures: In the Admin panel, go to the Design tab and then the widgets subtab. You choose what sidebar you want (if you have more than one) on the right, click “add” on the widget to the left, and then you can drag/drop to reorder the widgets.
Hi my Name is Eugene and I was trying to use your plugin in my blog but I’m receiving a fatal error in the widgets panel:
Fatal error: Uncaught exception ‘Exception’ with message ‘Illegal escape sequence ‘u” in I:\FerozoWebHosting\rule-xdesign.com.ar\public_html\blog\wp-content\plugins\twitter-widget-pro\json_decode.php:321 Stack trace: #0 I:\FerozoWebHosting\rule-xdesign.com.ar\public_html\blog\wp-content\plugins\twitter-widget-pro\json_decode.php(163): Zend_Json_Decoder->_getNextToken() #1 I:\FerozoWebHosting\rule-xdesign.com.ar\public_html\blog\wp-content\plugins\twitter-widget-pro\json_decode.php(120): Zend_Json_Decoder->_decodeObject() #2 I:\FerozoWebHosting\rule-xdesign.com.ar\public_html\blog\wp-content\plugins\twitter-widget-pro\json_decode.php(200): Zend_Json_Decoder->_decodeValue() #3 I:\FerozoWebHosting\rule-xdesign.com.ar\public_html\blog\wp-content\plugins\twitter-widget-pro\json_decode.php(123): Zend_Json_Decoder->_decodeArray() #4 I:\FerozoWebHosting\rule-xdesign.com.ar\public_html\blog\wp-content\plugins\twitter-widget-pro\json_decode.php(102): Zend_Json_Decoder->_decodeValue() #5 I:\FerozoWebHosting\rule-xdesign.com.ar\publ in I:\FerozoWebHosting\rule-xdesign.com.ar\public_html\blog\wp-content\plugins\twitter-widget-pro\json_decode.php on line 321
I hope that you can help me with this.
Regards from Argentina.
Eugene
I am getting the same error as rule-xdesign ([b]Fatal error: Uncaught exception ‘Exception’ with message ‘Illegal escape sequence ‘u” in[/b]), so I have had to deactivate the plugin.
Any ideas on what the cause is and possibly a solution? Thanks!
rule-xdesign and Kim: For now, I’m probably going to have to require that people have at least PHP 5.2 so they can use PHP’s built in JSON decoding. When work lets up a little, or if I find another employee that can help, we’ll look into it.
Hi Aaron – Thanks for the quick reply. The server has PHP 5.1.2, and the plugin had been working fine on that server up until just a few days ago. I haven’t changed anything, so I’m at a loss as to why it has suddenly stopped working.
Did Twitter do something to break TWP today? I got this on my site today:
Warning: array_slice() [function.array-slice]: The first argument should be an array in /**redacted**/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 327
I have not touched the backend at all, this just happened. I noticed this on other WP sites using TWP.
Cheers.
Twitter broke the feed by username…
This gives an error: http://twitter.com/statuses/user_timeline/username.format
This seems to work: http://twitter.com/statuses/user_timeline/id.format
Change the “Username” to your user ID in the options for the widget and it seems to work okay.
I am getting the array_slice error as well. Mack’s fix solves the error, however, it breaks the link to the Twitter page in the widget heading.
http://twitter.com/username
is valid, however,
http://twitter.com/id
is not.
Thank you for creating this great widget! Also, thanks for providing that simple css mark-up! I’ve got it installed and running on my site.
Toby
i am also getting the error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /homepages …
i upgraded the db on my 1and1.com account from 4.0 to 5.0. i exported the SQL file, created a new 5.0 db, then imported the tables. i updated my wp-config file to match, then tried to reactivate the plugin. same error.
is there any sort of legacy records or fields from the import that need to be cleaned up?
woops. second half of the error message
/d1583xx/htdocs/trirun/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 97
My theme doesn’t use widgets.
How can I call this plugin from the sidebar manually?
Hi there,
I’m getting this error too when I attempt to activate the plugin. I am running Php 5.0. Could it be something to do with the recent version of WP 2.6.3??
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /…/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 97
Matt: Please double check that you are using PHP 5+. Some hosts offer it but don’t have it on by default. You can check by making a php file called phpinfo.php and inside it put “< ?php phpinfo(); ?>” then upload it to your host and access it from your browser. It will give you all sorts of details about your PHP install.
You can see the Twitter Widget in action on a 2.6.3 blog by scrolling to the top of this page.
Hi Aaron thanks. My webhost lists it as 5.0 in my admin, but phpinfo() has informed me it’s 4.4.9, which seems a little inconsistent
Thanks for you help anyway.
Please could you remove the path to my home directory from my previous post?
Just dawned on me I was reading the version number of mySQL!
@matt – i made the same mistake. i use 1and1.com for my hosting provider. when i told them i needed php 5.x, they were able to show me a line to add to my .htaccess file which somehow automagically converted all of my websites (i have a bunch on that particular hosting plan) to run 5 instead of 4. just a small tweak to that file fixed it.
upgrading mySQL database from 4 to 5 was also pretty easy – even for a someone with no db experience.
Thanks ramasan! Very helpful.
hi there!
xoxoxo
I made on photoshop anime myspace banners.
take a look at them:
http://tinyurl.com/66dwoa
Thank you 4 your website
Is it possible to call this plugin with a command and not use the widget? I would like to embed this within my theme itself.
Me too. Is this possible?
Currently this is JUST a widget. Making it into a function that can be used in a theme is on the TODO list, but I don't know when it will happen.
This is a great plugin just testing it now
Great tool, but I'm having the same prob as HighTechDad. When I first added the tool, it worked fine. Suddenly, the tweets stopped appearing and I got the "Could not connect to Twitter" message. I saw your note to HighTechDad, but I'm not sure where to disable "Protect my updates"…any advice is most appreciated. (see http://blog.brillianttrips.com/)
It doesn't look like your twitter updates are protected. However, something is keeping your server from accessing the JSON feed that twitter offers. It could be any number of things. Sorry.
bummer! is it something I can talk to my host about? could you share some of the things that could be affecting this that we might try to work out? any leads you care to provide would be most appreciated. thx.
It's also quite possible that your host simply has a bad route to twitter or is slow. You could try increasing your timeout (2 seconds is the default). Unfortunately, if that remedies the problem, it'll also slow down your page load times (possibly considerably).
Thanks for the plugin, Aaron! It works great on our site.
Have you thought about allowing a search-based feed using search.twitter.com? Specifically, I'd love to include @ replies and general mentions in the plugin, not just our own tweets.
Hello! I love this plugin, but I'm having trouble styling it. I want space in between the tweets … not sure how to accomplish that. I've been able to style the text with your CSS tips above (thank you), but getting space in between the tweets has been hard for me. I'd also like the tweets to have bullets . . . I've inspected your CSS (I like the way your tweets are set up) but can't seem to replicate it. Any help would be greatly appreciated.
Все замечательно: и по стилю изложения, и по содержанию. Так держать!
what a impressive article. last days I didn' t read post like that. I am now your blog' s follower thanks for this useful blog. you are now in my bookmarks.
I have a question and its probably the dumbest you will get. But. How does it know who's feed to follow. I don't have anywhere to configure it for my account so all i get is this:
Warning: array_slice() expects parameter 1 to be array, string given in /home/.quim/ishiinet/keiu.org/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 327
I am not a novice normally but most plug ins for twitter that I have used ask me for at the very least my Twitter account. This one, has NOTHING. so if all these people can make it work i am MISSING something. Help please?
When you add the widget to your sidebar, you need to click the edit link which will expand the box and show the settings. This this the case with all the widgets that come with WordPress as well.
Dense question. My installed widget does not resemble yours – no spacing between tweets, no twitter bird (it that a profile pic?). I had used Twitter for Wordpress which I deactivated before I activated yours. However, it's unclear to me that the change was made – looks much like before, except for the profile pic. I took your code and pasted it to the bottom of my css stylesheet, but same result – I'm unclear where this goes. Appreciate any tips…
Well, I have my title set to:
<code><span>follow on twitter</span>Xavisys News</code>
Then, I have a lot of CSS applied to it:
<code>
.widget_twitter {
background: url(images/news-content.gif) no-repeat bottom left;
height:auto !important;
height:130px;
min-height:130px;
}
#content-right .widget_twitter ul {
padding:10px 20px 0 10px;
}
#content-right .widget_twitter li {
list-style:none;
margin:5px 0 10px 0;
}
.widget_twitter div {
background: url(images/news-head.gif) no-repeat top left;
padding:10px 0;
}
.widget_twitter h2 {
color:#009BD5;
font-size:12px !important;
}
.widget_twitter .entry-meta {
display:block;
font-size:80%;
}
#content-right ul li.widget_twitter li a {
color:#87AE4A;
}
#content-right .widget_twitter h2 span {
color:#87AE4A;
float:right;
font-size:10px;
font-weight:normal;
padding:2px 8px 0px 0px;
text-align:right;
width:110px;
}
</code>
Lastly, the image is custom made for this site. It's not part of the widget.
Well, I have my title set to:
<span>follow on twitter</span>Xavisys News
Then, I have a lot of CSS applied to it:
.widget_twitter {
background: url(images/news-content.gif) no-repeat bottom left;
height:auto !important;
height:130px;
min-height:130px;
}
#content-right .widget_twitter ul {
padding:10px 20px 0 10px;
}
#content-right .widget_twitter li {
list-style:none;
margin:5px 0 10px 0;
}
.widget_twitter div {
background: url(images/news-head.gif) no-repeat top left;
padding:10px 0;
}
.widget_twitter h2 {
color:#009BD5;
font-size:12px !important;
}
.widget_twitter .entry-meta {
display:block;
font-size:80%;
}
#content-right ul li.widget_twitter li a {
color:#87AE4A;
}
#content-right .widget_twitter h2 span {
color:#87AE4A;
float:right;
font-size:10px;
font-weight:normal;
padding:2px 8px 0px 0px;
text-align:right;
width:110px;
}
Lastly, the image is custom made for this site. It's not part of the widget.
Aaron — Maybe I've missed this, but how would I go about setting up a feed that doesn't just show my updates, but all updates on my friends timeline? Is that possible with this widget?
It's not possible right now because Twitter removed that functionality. If you check the readme you'd see:
Why can't I display a friends feed anymore?
Apparently the database queries required to display the friends feed was causing twitter to crash, so they removed it. Unfortunately, this is outside my control.
I second that Josh. I installed the plugin but I am only able to track my own Twitter feed.
I'm new to Twitter, however in your twitter feed, are you pulling your friends' feed in there, or is it when you type @username you are speaking to someone? Just curious and thanks for the plugin.
Also…dang.. had to write a new reply. Under the options for the plugin, the only option I see is for sending anonymous information. Nothing else shows up.
Hey there Aaron,
My Twitter widget automatically goes to the "twitter unavailable" status message when it seems like it hasn't even tried to connect before it. Any way to solve this issue? I've left the widget active for you to see.
Thanks!
–Michael
And of course, now it works. After I comment. After 2 hours of not working. =)
Is it just me or is the time calculation wrong?
At first, my widget showed "-1 years ago" for a recently posted twitter… i've extracted 3600sec from $startTimestamp to get it fixed…
Code now looks like:
$since = time() – ($startTimestamp – 3600);
Is that just me being in GMT+1? (seems a bit off because time() is always GMT)
Aaron — Just installed your plugin into my wordpress blog (hosted on aplus.net) but am getting the error: "Could not connect to Twitter". Why? How are you trying to connect to twitter? Do I need to get my hosting provider to open up a particular port for me? If so, which one? Please let me know! Thanks.
If you're using WordPress 2.7+, please upgrade to version 1.3 of the plugin. Twitter limits the number of calls that you can make in an hour. If you use something like tweetdeck or twhirl then each reques that those make is counting toward your total. With the older versions of Twitter Widget Pro, if you didn't have some sort of caching solution set up, each page load was another request to Twitter. It's very easy to exceed the 100 requests per hour limit. The new 1.3 version only checks twitter if it has been at least 5 minutes since the last time if checked. That means no more than 12 requests per hour.
I really like this post. Thanks for this article, Anyone got any more info about it? I am now your blog' s rss follower. you are now in my bookmarks.
Nice plugin! I want to be able to have it only pull back tweets with a specific hashtag. I know from the advanced search on Twitter that the following would work to generate an RSS:
$feed = "http://search.twitter.com/search.atom?tag=" . $hastag . "&from:" . $username . "&rpp=5";
But your search is driven from http://twitter.com/statuses/user_timeline/
Any suggestions how to make such a filter type option work?
Hi, just adding a vote for a non-widget php call, I would love to use this! The avatars are especially cool.
Hi there, I just tried to activate and got this message. My host uses PHP 5.2:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/shambhav/public_html/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 97
Thanks for helping!
This is definitely an issue with using PHP4. My guess is that your host offers PHP5 but that you probably have to enable it in your control panel, through .htaccess, or by asking them.
Thanks for sharing a nice widget
Hey, nice widget. I have an issue though. When I place it in my sidebar I get the following message showing up in the sidebar above the widget –
"Warning: array_slice() [function.array-slice]: The first argument should be an array in /home/teribl68/public_html/wp/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 327"
Any help on fixing it? I'm not real tech savvy with widgets other than installing them and making them show up where I want them to.
Were there no tweets to display? Also, if you're using WordPress 2.7+ could you try version 1.3 to see if it fixes the issue?
I'm getting the same Error. Any fix?
Tried version 1.3 today and got this error:
Call to undefined function wp_remote_request() in /home/fruity/public_html/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 152
It looks like I screwed up and didn't update the supported WordPress versions correctly. Unfortunately you'll need to have WordPress 2.7+ because the widget has been rewritten to use the HTTP class that was added in 2.7.
I just tried installing this to my wp blog – currently using the Atahualpa theme and it is not showing up anywhere on the blog. In plug-ins, it is there, but in widgets it is not. The only settings it has is the optional anon statistics, so how will it know my twitter info once I can get it working? Thanks for any help.
There should be a widget called "Twitter Feed" that's described as "Follow a Twitter Feed". All the settings (twitter user name, error message to display, etc) are in the widget itself, because each instance works independently.
I'm sorry if I seem to be dense here…I had previously tried using Twitter Feed (and did not like it because it only showed 1 tweet at a time and I keep having to hit 'update blogs' to get that one to show) so I re-activated it along with Widget Pro…so now Twitter Feed is working (still only showing 1 tweet etc.) and I still see nothing from Widget Pro. Am I just not understanding the point of WidgetPro? I thought it would provide a separate widget that shows all my tweets, @ replies, etc.
What I'm saying is that when you enable the "Twitter Widget Pro" plugin, then you need to go to the widgets management page in your admin section and add the widget titled "Twitter Feed" (this is the Twitter Widget Pro widget) to one of your widget-ready sections, adjust the settings, and save it.
The widget just doesnt stay in the sidebar when you click save. As soon as the page updates the widget disappears. Using latest 1.3.0 and wp 2.7. Im also running twitter tools so not sure if that has anything to do with it.
Though this is the only plugin widget that constantly removes itself from the sidebar everytime you add the widget and click save.
Can someone offer anyhelp on this, looks a great plugin, if only I can get it to save and show!
Will happily donate.
Tim
Unfortunately, the problem is similar to the RSS widget. If you try to load a feed and it can't get it for some reason (if the plugin can't get your Twitter feed), it get immediately deactivated. What is your twitter user name?
any help? this widget wont stay in the sidebar for me, keeps disappearing when I click save.
Ill donate if we can find a fix
Tim
I just added some screenshots to the wordpress.org site. They were all taken last night and this morning on a 2.7.1 install, which means it's working. Can you try disabling your other plugins and then testing again?
Having the same issue with with this widget (version 1.3.0) not showing up for me. Moreover, it prevents any widgets underneath it from showing up, in both the widget layout page and in the blog itself. Running WP 2.7.1
I just added some screenshots to the wordpress.org site. They were all taken last night and this morning on a 2.7.1 install, which means it's working. Can you try disabling your other plugins and ten testing again?
Downloaded again and noticed that you changed it to use wp_remote_request. It's still erroring out, however. If you add an is_array($resp) check to the beginning of the if conditions on line 154, it will at least error out gracefully (and non-fatally) — a connection error returns a WP_Error object instead of an array. But still trying to figure out what the connection issue is.
The height of my twitter updates are really long. It extends my entire sidebar length and there's a big space between the twitter profile pic and the actual status update. Please help me with what to change so I can get everything to work together. Thanks.
I'm running the latest version of PHP and Wordpress.
Everything you're talking about has to do with the styling of your theme. You'll need to add some CSS in order to properly style the widget.
Aaron, this seems to be an issue with the calls to _wp_http_get_object(); I triedchanging it to a direct instantiation of WP_Http and the widget now shows up, but still will not connect to twitter. If I add an option for 'blocking' => false to the array, I get an empty result, otherwise I receive a could not connect, permission denied error.
Figured out my issue, I think. Although my hosting company allows access to cURL, all outgoing requests are blocked by firewall by default; a separate/manual support request is necessary to allow outgoing requests to any outside server. I'm guessing the other folks who are running into this issue have similar hosting setups. Probably still a good idea to make sure that the $resp variable doesn't contain a WP_Error object before trying to access it as an array, as this will prevent such an error from completely breaking the widget and any widgets that are below it.
Hi,
Thanks for a great plugin – works right out of the box! I particularly like it that there’s css classes on everything; makes the widget very easy to style.
Just one minor issue: I understand that the plugin should be able to parse links in tweets, however, it seems that on my site, it doesn’t (sidebar on http://blog.erikanilsson.eu). As I said, a minor annoyance, because it still outperforms the other Twitter plugins I’ve tried.
That link should be http://blog.erikanilsson.eu/ obviously.
Is it possible to filter tweets based on twitter memes?
For example, if I only wanted my tweets with #sometwemehere in the body of the tweet to display on my blog, does your plugin have this feature? I would use the hash mark in my tweets.
Hey, here’s a type of error that I haven’t noticed anyone else among these comments having:
Fatal error: Cannot use object of type WP_Error as array in /home//wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 154
My preliminary guess: Twitter couldn’t be contacted and something strange happened.
For now, I’ll have to deactivate the plugin as this is killing my whole sidebar.
I tried upgrading to v1.3 of the plugin but I’m having the same problem as narnigrin. Any ideas?
yeah boys, the same error sometimes happens to me!!! what can we do???
i’m using php 5.2.6 and mysql 5.xxx (on dreamhost)
The error is occurring when Twitter is denying your request because you are over your limit. I just released version 1.3.1 which handles the error properly. Ass for the limits, Twitter limits the number of calls that you can make to their API in an hour. If you use something like tweetdeck or twhirl (or any other twitter tool that uses the API) then each request that those make is counting toward your total. With the older versions of Twitter Widget Pro, if you didn’t have some sort of caching solution set up, each page load was another request to Twitter. It’s very easy to exceed the 100 requests per hour limit. The new 1.3 version only checks twitter if it has been at least 5 minutes since the last time if checked. That means no more than 12 requests per hour.
Since 1.3.1 I can’t disable “Show Link to Twitter Widget Pro”.
lolfang, same here – I can’t disable the link to Twitter Widget Pro as well. Also, the connection error didn’t appear to be fixed as claimed.
Works great right out of the box! Thanks and keep up the good work!
I’d like to see an option where I can put a custom time / date stamp.
Or at least that the plugin fetches the time and date from my WordPress settings. Is this possible?
I’ve changed it “manually” for now but this will probably be gone once the plugin is upgraded and I’ll have to do it all over again…
I’m sorry, this was pointed out this morning. I plan to fix it asap and upload 1.3.2. You should see it in the next few hours at the latest.
Great! Looking forward to next release…
Having the same problem as lolfang — the widget won’t honour unchecking the “Show Link” option (yes I saved it properly
)
I’m running version 1.3.2 and I also can’t turn-off the “Show Link to Twitter Widget Pro”.
Aaron, tried to install the widget and I got a fatal error. We are using WP 2.7. Here is the error: Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /var/www/vhosts/
Squirrel: The plugin required PHP 5+ (preferably PHP 5.2+). You’ll have to ask your host to upgrade you.
Roger that. Thanks.
hey guys i got this prompt while installing your widget
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /hp/aa/ae/xt/www/digital-graphix/blog/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 110
my webhoster is running php4.4, ist that the problem?
I have been using this twitter widget for a short time and it is great for showing multiple feeds.
The problem I have is that is seems to work fine in Firefox on the Mac but not Safari.
Having said that the widget works on both normally but it seems the problem occurs only when using certain themes, the problem at the moment is a WOO Theme.
Cheers and thanks for the work you are doing.
Digital Graphix: Yes, the plugin clearly states that it requires PHP5+. You could ask your host to upgrade you.
Philip: The problem definitely lies in the theme. Twitter Widget Pro does all it’s work server-side, so the browser doesn’t affect it.
Hello! Great work but I am having some difficulty: Twitter widget will never connect and bring up my tweets although the link to my Twitter page works.
http://www.panall.net/
Many thanks for any help!
now i have php5 but still problems with the widget, activating succseed (plugin.php) but when I save allsettings (widget.php) the “save changes” button disappears and some widgets that I use so further settings aren’t possible (picture:http://bit.ly/nBU9c)The Widget won’t be shown and if i put it on the top the other widgets (categories, Tag cloud, blogroll …) won’t be shown as well
Screenshots
http://bit.ly/nBU9c
http://bit.ly/PPnep
Thanks Aaron, I will look into it today. Strange thing is the tweet show in the source code but not the browser
Definitely a cool widget and thanks for making it easy to install. Am fairly new to Wordpress. Wondering if you can show me how to tweak the css so the Twitter feed will display next to my user image instead of showing up beneath the image?
great widget. i was wondering how i can remove the “from web” etc. text at the end of each entry? i would also like to remove the “powered by” footer, if possible.
Aaron. Great plugin!! I am having trouble with one thing. Whenever I update a post, it also updates twitter. This causes the plugin to spam my twitter users! I tried checking the code, but couldn’t find where the check is to determine if a post is updated vs. new. Any ideas?
Thanks!
Bonnie: Unfortunately that’s going to be unique to every site. You might try looking for a design (XHTML/CSS) forum to get some site-specific help?
greenafrican: You could hide (set to display:none) “.widget_twitter .entry-meta” but that will also hide the time since the tweet. Maybe in the next version I’ll add a classed span around the from ______.
Chuck: This plugin doesn’t send anything to Twitter, it simply displays your twitter feed in a widget. You must have another plugin sending posts to Twitter.
Aaron
I am sorry my bad. You are right. I have so many plugins it gets confusing! I will check into it.
I have WP 2.71 and your plugin makes disapear the “save changes” button in widget admin page. What can I do? I could read that some other guys had the same problem. Thanks a lot about your help.
sorry I din’t check “Notify me…” and I like to be notified … Sorry again I did now
Santi: It must be a conflict with another plugin, because this has been tested and used on many 2.7.1 installs. Please try without any other plugins, or let me know if there is something extremely unique about your 2.7.1 install.
Hi Aaron I use the next plugins :
Akismet 2.2.3
Contact Form 7 1.9.5.1
Different Posts Per Page 1.7.6
Google Analytics for WordPress 2.9.1
HeadSpace2 3.6.21
Lightbox 2 2.8.2
SwfObj 0.7
Twitter for Wordpress 1.9.3 (I tried without it to test yours)
WordPress.com Stats 1.3.8
ZdMultiLang 1.2.2 (I tried without it to test yours)
WP sIFR 0.6.8.1
Can you view something strange?
Well, I know it works with Akismet, HeadSpace, and WordPress.com Stats because I’ve used it with those before.
Is it possible for users in the front end to be able to use a form to set it up so their own twitter blog will be posted?
Ken: No, I honestly don’t see the advantage of a user seeing their own Twitter account, since they already know what they said.
Hi,
I have been using Twitter Widget Pro without a problem and then all of a sudden it started throwing a PHP error both in the widgets section of the admin page and the front page. The weird thing is that it has been working fine and this appears to have just started. Any ideas what is going on? Here is the error message. (I manually removed it from my site because I do not want the constant errors on the frontpage.):
Fatal error: Uncaught exception ‘Exception’ with message ‘Illegal escape sequence ‘u” in /var/www/localhost/wordpress/wp-content/plugins/twitter-widget-pro/json_decode.php:321 Stack trace: #0 /var/www/localhost/wordpress/wp-content/plugins/twitter-widget-pro/json_decode.php(163): Zend_Json_Decoder->_getNextToken() #1 /var/www/localhost/wordpress/wp-content/plugins/twitter-widget-pro/json_decode.php(120): Zend_Json_Decoder->_decodeObject() #2 /var/www/localhost/wordpress/wp-content/plugins/twitter-widget-pro/json_decode.php(164): Zend_Json_Decoder->_decodeValue() #3 /var/www/localhost/wordpress/wp-content/plugins/twitter-widget-pro/json_decode.php(120): Zend_Json_Decoder->_decodeObject() #4 /var/www/localhost/wordpress/wp-content/plugins/twitter-widget-pro/json_decode.php(200): Zend_Json_Decoder->_decodeValue() #5 /var/www/localhost/wordpress/wp-content/plugins/twitter-widget-pro/json_decode.php(123): Zend_Json_Decoder->_decodeArray() #6 /var/www/localhost/wordpress/wp-content/plugins/twitter-widget-pro/json_decode.php(10 in /var/www/localhost/wordpress/wp-content/plugins/twitter-widget-pro/json_decode.php on line 321
Aaron: Well, we’re thinking of having a general community section of our site where members can give us the name of their twitter accounts and have the system automatically set up a twitter widget that everyone can see. Is that possible with this widget?
I’m very happy with your plugin- thanks! I have one request/query, though. When a tweet is in reply to a specific tweet, Twitter displays an “in reply to” link- if you click that link, you see the tweet being replied to.
Is it possible to have this feature in Twitter Widget Pro? I’ve noticed that various twitter clients seem to be able to use this information, so I assume it is part of the Twitter API…
thats great that you are talking about the twitter api,a good example of searching with the twitter api is on twiogle.com because you can search on twitter and google at the same time.
Great plugin – this was the thirs one I tried and by far the best + most flexible. I have a code suggestion for a future version. Please add the folowing code to end of the plugin:
add_filter( 'widget_twitter_content', 'convert_chars' );
This will make sure that special chars are properly encoded.
Thanks again for a great plugin!
-Mike
I just tried this plugin with WP 2.8b2 and it couldn’t be activated due to a fatal error, here’s a screenshot: http://twitpic.com/6fayl/full
Michael: I’ll look into that. I *just* flew back from WordCamp, so I’m pretty far behind, but I promise to get to it as soon as I can.
Dixon: The widget works fine (great actually) with 2.8, but it requires PHP 5+. Ask your host to switch you over to PHP 5+ and it’ll start to work.
Is it possible to follow more Twitter accounts in one plugin?
Justin: The widget uses the multi-widget pattern, so you can place as many as you want in your widgetized areas and each one can follow a different user.
Hi Aaron,
I was hoping to be able to use your plugin for the site I’m working on, but it doesn’t seem to be connecting with any username I’ve tried. I’ve verified that twitter is up and running, but can’t get anything to display except for the problem with twitter message that you’ve provided.
Here’s the site, which is currently in development. It’s not finished yet, but is supposed to go live tonight:
http://joerotellasays.com/
It’s WP 2.7.1. Thinking it might’ve been a plugin conflict, I disabled every plugin on the site except for Akismet. Still no joy.
I tried using Twitter for Wordpress, but it’s having the same apparent connection problems as your plugin. Strange thing is that I’m using TfWP on my personal site and it’s never failed, that I’m aware of. Not sure what’s going on.
Any insight you may have would be greatly appreciated.
Thanks much!
If multiple plugins are having problems, it’s probably some sort of connection problem between your host and Twitter. Maybe someone on your host was abusing the Twitter API and got your IP blocked.
Another possibility is that you’re exceeding your API call limit. Twitter limits the number of calls that you can make in an hour. If you use something like tweetdeck or twhirl then each request that those make is counting toward your total. With the older versions of Twitter Widget Pro, if you didn’t have some sort of caching solution set up, each page load was another request to Twitter. It’s very easy to exceed the 100 requests per hour limit. The new (1.3+) versions only check twitter if it has been at least 5 minutes since the last time if checked. That means no more than 12 requests per hour. Still, if you’re using other systems with that username, you may have exceeded your limit.
Thanks for the quick reply! I haven’t had any problems with connecting before building out this site. I thought about exceeding the limits, but the twitter user account that’s being set up is a fairly new one and the person doesn’t use twitter very much at all yet. So excessive api calls would seem a remote possibility at best.
The site is on a hosted server, so you may have something with the abuse and IP blockage. But when I tried my personal twitter username it gives the same results, or lack of them. And when I try the same thing from my personal site (hosted on a completely different host) it works every time.
I’ll keep hammering away at it.
Thank you for your time. I appreciate it.
Quick note to let you know that I installed your plugin on my personal site and it worked perfectly. I tried out several other usernames, including our client’s and they worked without a hitch too.
So I’m inclined to agree with you about the IP blocking and will contact the hosting company to see about getting that taken care of.
Thanks for your help.
Thanks for letting me know. Keep me updated, I’m curious how Twitter will handle such a request.
Is it possible to follow multiple accounts on one inserted plugin?
With one installation of the plugin you can create as many widgets as you want. Each widget, however, can only follow one Twitter username.
Hello there,
I was wondering whether there was any way to allow separate styling of the first and last tweets that appear in the widget?
Many thanks
Dan
Hi,
Is it possible to use this plugin with a PHP tag instead of the widget function?
Thanks!
Sue
Right now it’s only available as a widget.
Hey! where to add my CSS style?
Nice widget!
This widget works perfectly on 2.7 but after updating to 2.8, it seems to fail. I hope this works with 2.8 soon. Thanks for the great work!
ooops… ignore the reply. I just realized the reason for the twitter fail is because the ‘Number of seconds to wait for a response from Twitter (default 2):’ was left blank when I upgraded to 2.8.
I installed and tried activating the plugin today and got a fatal error activating:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home3/michaels/public_html/wp/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 121
I am running Wordpress 2.8
The plugin requires PHP 5 and you’re running PHP 4. Most hosts offer PHP5 but you probably have to enable it in your control panel, through .htaccess, or by asking them.
Thanks. Thought I had maybe the PHP5 switch already.
Great plugin, although please, please, please, please get an option included for removing those annoying ‘from web’ bits! It ruins an otherwise perfect twitter widget!
I just tagged and released version 1.3.7 with adds some spans with classes around the different bits of meta data to help you hide them with CSS. 1.3.7 should be available within an hour.
Great, could you advise how to hide the ‘from’ bit using css? Thanks.
Aaron,
Yesterday I installed the plugin successfully and put in my Twitter username, however, on my blog the plugin simply displayed “Could not connect to Twitter.” It then briefly worked and displayed tweets for the space of a few minutes, but then resumed the “could not connect” message and has continued displaying through today as well. Is this something on Twitter’s end?
There’s an option in the widget that says “Number of seconds to wait for a response from Twitter” …the default is 2, but some servers will need that time increased.
Great, could you advise how to hide the ‘from’ bit using css? Thanks.
Add this to your stylesheet:
.widget_twitter .from-meta {display:none;}
perfect! thank you so much!
Is there a .po file available for translation? I’d be happy to translate the plugin in Dutch (and the availability is often an incentive for others to translate).
Thanks,
Dash
I haven’t made any of my plugins translatable before, but it’s definitely on my TODO list. As a matter of fact, I think I’ll work on this today some.
As I said, I’m not too savvy on this, but I think I supply a .pot file not a .po right?
I just tagged version 1.4.0 with a POT file.
I am using the pot file coming with the plugin. But how do I localise/translate the time stamp information, e.g. “about 4 hours ago” or “04:36:25 PM June 29, 2009″?
Could you please post what style code you are using for your Twitter Widget? I like the way it looks with last text smaller for the date. Thank you!
My CSS looks like this:
.widget_twitter {
height:auto !important;
height:130px;
min-height:130px;
}
#content-right .widget_twitter ul {
padding:10px 20px 0 10px;
}
#content-right .widget_twitter li {
list-style:none;
margin:5px 0 10px 0;
}
.widget_twitter div {
background: url(images/twitter-top.gif) no-repeat 2px 2px;
-moz-border-radius:5px;
-khtml-border-radius:5px;
border: 2px solid #CCC;
padding:10px 0;
}
.widget_twitter h2 {
color:#009BD5;
font-size:12px !important;
}
.widget_twitter .entry-meta {
display:block;
font-size:80%;
}
#content-right ul li.widget_twitter li a {
color:#87AE4A;
}
#content-right .widget_twitter h2 span {
color:#87AE4A;
float:right;
font-size:10px;
font-weight:normal;
padding:2px 8px 0px 0px;
text-align:right;
width:110px;
}
As you can see, it uses a custom image (the twitter bird with the gradient) for the background, but that’s it…that’s all the code to style the widget as I have it.
Thanks for the fast help. I am adding the CSS code to this file: style.php but I don’t see any changes happening to the way the widget is displaying the info in the sidebar. I am using the Flexibility2 WordPress Theme. Should I be adding the CSS code to a different file in the theme?
In Germany, it’s not allowed to enable (anonymous) data collection by default and making it an opt-out option. Could you please change it to be disabled by default?
I’ll have to think about it. For now it’s extremely useful for me to get as many stats as possible.
Works great, thank you.
Unfortunately, even after your recent upgrades, this widget says it cannot connect to Twitter. In fact none of the Twitter widgets work for me. The only way I am able to get my twitter account to show up is by using the FriendFeed Activity widget and linking it to a FriendFeed account dedicated only to my Tweets. Not sure what is going on here. Very weird and frustrating. My website, in testing, is at queervisions.com/gayrightsmedia
If multiple plugins are having problems, it’s probably some sort of connection problem between your host and Twitter. Maybe someone on your host was abusing the Twitter API and got your IP blocked.
Another possibility is that you’re exceeding your API call limit. Twitter limits the number of calls that you can make in an hour. If you use something like tweetdeck or twhirl then each request that those make is counting toward your total. With the older versions of Twitter Widget Pro, if you didn’t have some sort of caching solution set up, each page load was another request to Twitter. It’s very easy to exceed the 100 requests per hour limit. The new (1.3+) versions only check twitter if it has been at least 5 minutes since the last time if checked. That means no more than 12 requests per hour. Still, if you’re using other systems with that username, you may have exceeded your limit.
There are also some people that have had to ask their hosting company to allow the requests: “Although my hosting company allows access to cURL, all outgoing requests are blocked by firewall by default; a separate/manual support request is necessary to allow outgoing requests to any outside server. I’m guessing the other folks who are running into this issue have similar hosting setups.”
Hi, can you add a functionality to your plugin?
it’s annoying that i have to deactivate the “send system info” checkbox everytime an update of your plugin is released. You might want to make that setting a little more persistent.
Plus, it’s annoying because i force ssl for admin panel-usage, and your plugin always sends unencrypted requests (for system-info submission) thus producing annoying error-messages when a logged in user opens his admin-panel.
thanks,
Amon
p.s. sorry for my bad english, i’m not very practised.
I will try to fix the persistent setting issue, it SHOULD save your settings.
As for the ssl issues, those should be gone because it no longer loads/submits a form with the data.
Hello,
thanks for this great plugin !! Works perfect. But, I only want to change the color of the name of the Widget. It has the same color as my theme, meaning that I cannot read my line: “follow me on Twitter” (just after the RSS-button).
Is there any way to change the color of this? I’v looked for it in the code, but am a newbee on this, so I could not find it. Can anyone help me?
Thnx – Peter
I went and looked at your theme. You need to add some rules in your CSS that set the color for “.BlockHeader-text a”
Hi Aaron,
Great widget, far surpasses everything else I’ve found. It is a bit messy with my theme, but I’m working on that, otherwise it works perfectly.
Although, I would be interested to know how I would disable the automatic linking of #hashtags?
Thanks
Right now that’s not possible without modifying the code of the plugin. However, that’s an idea for a future release.
Hi there,
I’m having a really difficult time getting space between my tweets. I’ve actually copied your CSS from above and put it into my stylesheet, changing your #content-right to my #sidebar, just to try to end up with that happening. It’s not.
I must be misunderstanding something. Please, can you help me?
Your theme seems to overwrite widget_twitter class with it’s own generic class (which makes it harder to style). You can still do it, but the styles will affect all your widgets.
Around line 261 of your CSS you’ll see the definition of #sidelist li…add something like this to that style:
margin:5px 0 10px 0;
That’s top right bottom left, so it’s 5px margin on top, 10 on the bottom and 0 left and right.
I dont understand how to style this still. I am a noob, and i just cant seem to find the correct css file to add these classes too. can you help? I tried global and it did nothing.
i cant understand how to make the widget like, for example, the one on your page. all i get is an ordered list in the style of the theme im using, which kinda sucks. Im such a n00b!!!
If you send me a link to your site with the widget in place, I’ll try to get you some basic styles and tell you where to add them.
my site is http://www.ipwndaily.com. Im also having some other issues however. It says my tweets were added years ago. when it was really just days… and it also says twitter is down…when its up..
Hi,
Thank you for this great Twitter widget!
I have a really big problem right now. The widget worked fine for a few days I was testing it. But now it doesn’t even show on my blog. I have no idea why this is. I noticed it when all the widgets I have under the Twitter Widget Pro disappeared.
It breaks my source code as well. For example the footer of my blog is not displayed anymore. If you check my blog’s source you’ll see it’s totally gone from the place the widget should be one and under that (it’s at the moment at the bottom of my sidebar so that the other widgets would be displayed properly).
I tried also another account. The only tweet in that account was displayed but the widget told it was posted a year ago (I had posted it maybe a minute ago). When I change my settings for my main account (for example time zone) in Twitter, the widget sometimes shows the error message you can modify yourself for one time but one time only.
I’ve also tried to delete the plugin and re-install it, and deactivate/activate the other plugins, but nothing seems to work.
Where could the problem be?
Sincerely,
Tommy
Tweet me, tweet me not
Hi, thanks for the plugin. Simple and good.
I incorporated this plugin to my wordpress theme and is seeing a small issue in Safari (v3.2.3) causes by
clear class in line #362 in wp-widget-twitter.php when ’show profile image’ is selected’.
I have clear:both in my style sheet.
The <div class="clear" /> making twitter shows only one entry (the latest) in Safari.
Generated code:
<li> <a title="my name" href="http://twitter.com/myID">
<img alt="my name" src="http://s3.amazonaws.com/twitter_production/profile_images/216352699/lsd_normal.png" />
</a><div class="clear" /></li>
If I disable ’show profile image’ or remove the clear div, then all entries show.
This is a tiny issue and can be fixed easily by me by removing the offending clear div, but it creates potential problem for users who use my theme (I suspect this also applies to people using other themes and who download your widget. It’s always a bad idea to ask user to hack the core code or don’t use Profile Image due to rendering issue in Safari.
I also feel that, removing the profile image code away from the UL list offers more flexibility for styling, e.g. I can use float or absolute position to style the profile image so that it align with the h6 title.
<h6><a class=’twitterwidget’ href=’http://twitter.com/myID’ title=’Twitter: myIDD’>Tweet me, tweet me not</a></h6>
<span><img alt="myID" src="http://s3.amazonaws.com/twitter_production/profile_images/216352699/lsd_normal.png" /> </span>
Right now, I use ul li:first-child and making it absolute position.
Semantically, span or just a div after h6 is more appropriate
because profile name belongs no to twitter entries thus it’s not a list item.
Thanks!
cd