WordPress Plugin: Twitter Stream
It’s been just over a year now since I released my first plugin which you may all know is The Attached Image, so I thought it was time I released another plugin. I hadn’t actually gone out on purpose to make this plugin, but a client’s website needed a simple Twitter feed plugin & while there are already WordPress plugins out there that do the job they insisted a custom one be built. So I set about making it & rather than have it sit in my WordPress functions folder doing nothing (other than working on the client’s site, of course) I thought I should release it as a plugin for anyone to use. 🙂
Latest Info – 04/03/2013
If you have updated the plugin to version 2.5 and are having trouble, please make sure to delete the cache. Either manually or using the button on the options page.
What is Twitter Stream?
Twitter Stream is a very simple plugin originally created as a small function for a client’s website. Rather than have it sit doing nothing in my WordPress functions folder I thought I would extend it and make it into a plugin for everyone to use.
It’s functionality is very, very simple. It is designed to simply grab a set amount of status updates from the Twitter user account you request. If there are enough requests I may add some additional features, but for now it is designed to be very simple and run as quickly as possible while using the least amount of resources possible.
What Features Are There?
- Connect to Twitter securely using oAuth. (required)
- Show the twitter timeline for any public username.
- Choose how many tweets to show.
- A Widget or template function is available.
- File caching to stop API overuse.
- Optional date shown in xx ago format, also links to permalink for the tweet. (Requested by Ron)
- Customizeable via CSS. (see the ‘Can I Style It?’ section below)
- Authentication for better API limiting & ability for protected users to show their tweets.
- @replies now link to the user profile of the user you are replying to.
- #tags now link to the Twitter search page for that hash tag.
- Link to user’s profile, customizable via CSS & via function parameter.
- Follower count can now be shown.
- Retweets can now be shown with normal tweets.
How Do I Install It?
You can download it from the WordPress repository here, and then install it as you would any old style WordPress plugin, which is as follows:
- Download the zip file and unzip it to somewhere, say your desktop.
- With any good SFTP client upload the extracted folder to your
wp-content/plugins/
folder. - Enable the plugin in the WordPress plugin page.
Of course you can also install it by using the WordPress auto installer.
How Do I Use It?
Due to Twitter not having a solution for open source applications using oAuth yet, you must follow some slightly more complicated instructions to sign in via oAuth. Comprehensive instructions are provided in the plugin but here is a rough overview.
First you need to register a Twitter App, save the consumer keys you are provided with, then sign in with Twitter. As I said more detailed instructions are provided as you set up the plugin, including tips for what to enter when registering you app.
Finally you can show your tweets using a widget. The widget is a WP 2.8 & up compatible widget. If you are using a WP version lower than 2.8 you should really upgrade for security reasons if nothing else.
If you are a good ‘ol fashioned function user then you can call Twitter stream using:
1 |
twitter_stream($arg); |
Providing either a keyed array or an argument list. All the parameters available are listed here.
How Do You Get Round The API Limit?
Now that oAuth has been implemented API requests will be counted against your personal account rather than your servers IP address meaning that shared servers should no longer cause a problem. However to reduce the possibility of overusing the API even further caching is still in use.
Sometimes I Get An Error Message!
There is a built in error message that is shown if Twitter fails to provide a vaild XML file. Reasons for this could be that the Twitter API is down (which Twitter claim is highly unlikely), or the plugin failed to read the cache file. If this happens, and you know Twitter is available, try deleting the cache file which is named username.cache
. You can do that using the brand new ‘delete cache’ button which is shown on the bottom of the authorization page. Just click ‘Twitter Stream’ under the settings menu to find it.
Sometimes The Date Is -xx Seconds Ago?
This is sometimes difficult to get your head around. Simply put it is caused by your servers clock being faster or slower than Twitters clock. To work out the time ago it takes the timestamp (number of seconds since Unix Epoc) and takes it away from the timestamp at which the tweet was posted. If your servers clock is slower than Twitters, for the first few seconds it ends up giving a negative value therfore seeming as if it was posted in the future. It could be something completely different involving Aliens, badgers and evil pidgeons, but that is the most sensible thing I’ve been able to come up with. If you have a better idea what it is let me know.
Sometimes oAuth Misses The Deny/Accept Page When I Press ‘Sign in with Twitter’?
This happens if you have already authorized Twitter Stream to be used with your Twitter account. Until you press the sign in button the plugin can’t tell if you have already given authorization or not. This generally happens if you have more than one blog using Twitter Stream with the same Twitter account. It’s perfectly normal though.
Can I Style It?
You can. I haven’t added any styles so I could keep the plugin on one file & keep it free of clutter. The available CSS classes are:
.at-reply
for @replys..hash-tag
for #tags.a.twitter-link
for autolinked URL’s within the timeline.a:hover.twitter-link
for autolinked URL’s within the timeline when they are hovered over.a.twitter-date
for the date permalink.a:hover.twitter-date
for the date permalink when it’s hovered over..profile-link
for the newly added link to user profile..follower-count
for the newly added follower count.
Can I Have A Options List?
Sure. The basic usage for in the template is this.
1 |
twitter_stream( [query-string/array] $args); |
Here is the info for each parameter.
username
should be a string and is the username of the Twitter timeline you want to return. No longer required. If omitted will show the user who authorized Twitter Stream’s timeline.count
should be a string and is how many tweets to return. Default ’10’.date
bool or string. If set to TRUE it will show the time ago with a hyphen as a default separator. If it is a string of anything other than ‘TRUE’, ‘true’ or ‘1’ it will use that as a separator.profile_link
a string. Allows you to customize what the link to your Twitter profile (shown at the bottom of the tweets) says. ‘Visit My Profile’ by default. Use a space, like this ‘ ‘, to show nothing.retweets
bool, true or false. Shows retweets with normal tweets.show_followers
bool, true or false. Shows the number of followers.cache_time
Set the length of time tweets are cached for.echo
Controls if the tweets should be echoed out to the page or returned as a SimpleXMLObject for manipulation via PHP. Defaults to TRUE, meaning echo tweets to page.
Here is an example using all parameters.
1 2 3 4 5 6 7 8 9 |
twitter_stream(array( 'username' => 'twitteruser', 'count' => '10', 'date' => FALSE, 'profile_link' => 'Visit My Profile', 'retweets' => FALSE, 'show_followers' => FALSE, 'cache_time' => 30, 'echo' => TRUE )); |
I Need A Translation!
You can download translations files for the plugin here. These are .po & .mo files in a zip for the languages available. For the translation to work you only need the .mo file placed in the same folder as the plugin.
- Swedish Translation – Thanks to Albert Johansson
- Belarusian Translation – Thanks to FatCow
- French Translation – Thanks to Tolingo.com
- Dutch Translation – Thanks to Rene
- Alternative Dutch Translation – Thanks to Sander Van Vliet
- Spanish Translation – Thanks to inMotion Hosting
- Serbo-Croatian Translation – Thanks to Borisa Djuraskovic (WebHostingHub)
- German Translation – Thanks to Stefan Moeller
I have provided the .po file for those who would like to amend or alter anything. Should you do that please send me a copy of the amended .po file so I can update the files here. If you would like to translate Twitter Stream into a language not available here you can download a blank .po file here. Once you’ve done the translation send it to me at admin [at] return-true [dot] com.
A huge thank you to those who have translated so far & a big thank you to anyone who may help in the future.
I Have A Feature Request! / I’ve Found A Bug!
You can report all bugs via the comments which I read as soon as I can, or you can send me an email via the contact page. Either way I promise to try and get back to you as soon as possible.
I Want To See A Working Demo?
Okay. Well the Twitter timeline here on Return True (on the right) is created using Twitter Stream. You can also see it on Medibolism & on Lisa Marie Art’s website.
Where Do I Get It Again?
Once again you can download it from the WordPress plugin repository here, or you can install it via the WordPress auto installer in your blog admin.
I Love It, Can I Give You Some Love?
Wait… What?!! Oh you mean that sort of love. Sure. 😛 You can help out in one of three ways. You can donate to help cover server costs & the cost of the coffee that keeps me coding. You can do that by clicking the button below.
You can buy me a present from my Amazon Wish List which would be very much appreated, or you can simply spread the word about Twitter Stream & The Attached Image.
Well that’s about it if you find any bugs or have any requests let me know.
Note: Twitter bird artwork in header image created by lisa-marieart.com. Used with permission.
445 Comments
Robert
You can solve the “cannot redeclare”-Problem this way:
Edit “twitter-stream.php” and change line 34 to
if (!class_exists(“TwitterOAuth”)) require_once(‘twitteroauth/twitteroauth.php’);
Edit twitteroauth.php and change line 10 to
if (!class_exists(“OAuthException”)) require_once(‘OAuth.php’);
This way you can be sure, that those files are only included, if the classes not already exist.
Perhaps you could release a hotfix with this. Because a lot of people have the same problem.
Anyway: Thanks for this great plugin 🙂
Paul Robinson
Ahh. Thanks Robert. I didn’t realize there was a
class_exists
.I’ll release a hotfix in a few minutes. 🙂
Robert Heine
Damn.. now i have this error in the frontend:
Fatal error: Call to undefined method TwitterOAuth::get() in wp-content/plugins/twitter-stream/twitter-stream.php on line 262
Perhaps you should rename your classes, so they can’t conflict with other plugins or whatever 🙁
Paul Robinson
Hmmm. Unfortunately they aren’t my classes. They are just under a license that allows them to be sub-licensed which I why they can be distributed with WP plugins.
There is a comment by the guy who created the class about the error & the only solution he came up with was to just comment out the OAuthException class. I’ll just do that & release it as a hotfix.
Hélène
Hi Paul,
I can’t activate Twitter stream.
This is what I get :
Fatal Error :
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /***/***/www/wp-content/plugins/twitter-stream/twitteroauth/twitteroauth.php on line 17
I’m using WP 2.9.2
Do you any idea to fix that problem ?
Thanks for your help
Admin Edit: It’s never a good idea to post your servers full path. Removed for security reasons. 😉
Paul Robinson
Hi,
The most common reason for this problem is that your host is running PHP 4. Twitter Stream requires PHP 5 because of the TwitterOAuth class & the need for SimpleXML.
Please try and ask your host if you have PHP 5 & if not if they can upgrade you to PHP 5.
Helene
Hi Paul,
Many thanks for your tip.
It works very well.
Paul Robinson
Glad I could help.
Katie
Hi Paul, I’ve gotten the Twitter steam all set with the api key, signed up via my Twitter account, and my tweets show up, but I’ve been getting this message for the last couple of months:
“You need to go to the Twitter Stream Authorization page in the WordPress Admin (under settings) before I can show your tweets”
Am I not doing something correctly?
Thanks for clarifying!
Paul Robinson
Hi Katie,
That would normally mean that Twitter Stream is working without authorization.
If you can tell me all the steps you took to authorize Twitter Stream I’ll hopefully be able to help you out.
Scott
How can I put twitter stream in a page and not in the widgets?
Paul Robinson
Hi Scott,
You would have to use a custom page template as described on the WP Codex as it’s a bit long to describe here in the comments.
In the template you would need to use the PHP function call version of Twitter Stream. Once you’ve activated the plugin, and authorized it in the admin take your already completed page template & add:
customize the parameters as you wish using the descriptions in the post above.
I hope that helps you out.
Emiel
Somewhat off-topic, but I really love how your plugin uses Ajax to auto-refreshes the tweets it shows and I was wondering if you know of any similar plugin that shows the latest facebook wall-postings (or statusupdates)?
tnx
Emiel
Paul Robinson
Thank you for the kind words, but I’m not sure what you mean by uses AJAX to refresh the tweets?
As for Facebook plugins, I haven’t used any but there are a few that show your latest status updates on the WordPress Plugin Repository. The one I’ve heard the best things about it this one.
Emiel
Hmm maybe it’s not AJAX 🙂 Whenever I see something refreshing itself without reloading the entire page I think its Ajax 😉 Tnx for the link for the facebook plugin!
Paul Robinson
Well yes generally it is a type of AJAX, but I never designed it to refresh like that so I was intrigued as to what you meant. Do you have a link to the site with that on so I could see it? Not that I’m complaining or anything. 😆
No problem, there are a lot of plugins out there. Best way to find a good one is try them out till you find one that works for you. 😉
Emiel
Oh darn I forgot, I combined your twitter stream with a jquery-based ticker widget 🙂 It’s been awhile since I worked on it, hence the failing memory 😉 It’ still work in progress but you can see it working here!
Paul Robinson
Ahhh. I see. It wasn’t this one by any chance? If it was them my memory is just as bad, I forgot I’d wrote it. 😆
Emiel
LOL that’s it! Great, I was searching where the heck I found that twitter ticker, so you helped me again 🙂 I’ve bookmarked it for future use, cause it should be relatively easy to create a ‘facebook status ticker’ in the same way… Thanks again!
Paul Robinson
No worries, glad I’ve been able to help out & have a happy Christmas (or holiday) & merry New Year. 🙂
rob
cannot get the plug in to work no twitter stream is showing on my home page
Paul Robinson
Hi Rob,
I can’t really help you without any further information… Any errors? Anything at all?
Derek Johnson
Nice plugin and I really like the flexibility in the options. The only thing I can’t figure out is that tweets from a few seconds ago are showing as 1 hour ago. How do I fix that?
Paul Robinson
Hi Derek.
Really? I can’t say I’ve ever seen that. I’m not sure why it would be happening. I’ve sometimes seen it say that it was posted -xx seconds ago, but that is due to the time difference between your webserver & Twitter’s servers.
I’ll definitely check into it as soon as I can. If you want to take a peek yourself you are more than welcome too, it is around line 415 or the function called
twitter_stream_time_ago
in the twitter-stream.php file.Derek Johnson
I think you hit the nail on the head when you said the difference between twitters servers and mine. Probably some daylight saving thing going on there.
Thanks for the help.
Paul Robinson
It happens to my server but the opposite way round. I end up with – seconds or minutes. 😆 It’s the only explanation I’ve been able to come up with that makes any sense. 😉
Derek Johnson
Yep. $now -= 3600 did the trick.
Paul Robinson
Nice. 🙂
I’ll look into adding a way for the code to determine the time zone. That way it will be done automatically. 😉
Hendrik
Thanks for this plugin!
I’ve protected the tweets of @sildewit, which I want to display on my blog (http://sil.zeilteam.nl).
It works, however, it shows only one. Eventhough I use ‘count’ => ’50’.
Any thoughts?
Tnx!
Paul Robinson
Hi Hendrik,
I’m not really sure what would cause that to happen. I’m assuming you’ve already completed the activation steps needed in the admin?
I know it’s a pain, but do you have a friend’s Twitter or another Twitter account that you can try that isn’t protected? It will help me know if it’s a bug with Twitter accounts that are protected or not.
One other you could try is to go to the URL used by the API to get the data from Twitter:
If you change the
paulbrobinson
to your username and then change the number on the count, do you still only get 1 tweet?Let me know if you can do that or provide any other information & I’ll go from there. 🙂
Darren Goldsmith
Hi Paul
Busy is good, right? 🙂
Can I put a request in, for the other type of replies in the update?
Darren.
Salhah
thank you for the great plug in you did. Just Awesome ! I love the simplicity of its use. God Bless your hands, you did a magic :). I only have one v.imp. request- if possible-; How do I install it in non blogging website e.g. news or games site?
Paul Robinson
If the news/game site doesn’t use WordPress then I’m afraid you can’t as it uses WP to run on. Without WP the plugin just can’t run. 🙁
Salhah
Thanks for your fast reply.
Mike
Hey Paul,
Thanks for this plug-in, I’m diggin’ it. I was wondering if I could add one line of space between each tweet and have a bullet for each tweet as well? Thanks
Paul Robinson
You would use CSS to do that. To add in the line you would use margin or padding on
div.twitter-stream p
and a bullet would be a background image. You would need to pad your tweets in (using the same target as before) to stop the text from overlapping your image.I’m not sure how knowledgeable you are with CSS so if you need any more help let me know & I’ll ask our resident CSS expert Lisa Marie to knock something up for you. 😉
Mike
Paul,
Thanks for the quick response. I got both things working. This site is really nice, btw.
Cheers!
Paul Robinson
No worries. 🙂
Mike
One more quick question. How can I get the full tweet to be displayed? It seems as if it is cutting off on longer tweets.
Paul Robinson
Twitter Stream just requests for the tweets from Twitter. For some reason, which I can’t find any reason for, Twitter is returning that tweet like that. I have no idea why. You can see what Twitter is give back here:
http://api.twitter.com/statuses/user_timeline/mwilcox1.rss
Hendrik
Hi Paul,
Other twitter accounts (unprotected) do work, so that’s seems to be working just fine.
Can you call the function twice in one page?
Thanks,
Hendrik
Paul Robinson
Hmmm. I’m not sure why protected Tweets would be causing a problem. I’ve done as much checking as I can, even creating a Twitter account & protecting it and I don’t run into any problems. 🙁
I’ve never tried calling it twice, but I don’t think you can. There is no harm in trying it though.
Darren Goldsmith
Your CommentsHi Paul
Thanks for this plug-in… getting some odd results though. I know very little about WP or Twitter so bear with me. Essentially I’m setting up this WP site for my wife (it’s merely a framework at the moment) but can’t seem to get the widget to display according to my settings.
http://www.mrsgoldsmith.co.uk
I’ve done the whole oAuth thing… resgistered an app… got my keys and the stream appears to be working. However, when I make adjustments for the amount of Tweets to display, there’s no change on the site. If I delete the cache I then get some changes but it’s never the right amount, for example, it’s currently set to 10 Tweets but I’m only getting 6. If I change that to, say, 2… the site doesn’t update, until I delete the cache again. Is that supposed to happen? I’m assuming not?
Oddly, if I change the title, this happens instantly (on site refresh). Same goes for the ‘Show Followers’ option.
What am I missing?
Site is sitting on a Windows 2003 shared server with Fasthosts, if that makes any difference. I could have placed it on a Linux server but would that make any difference? It would still be shared.
Any help would be great appreciated… going a bit loopy here! 🙂
Cheers,
Darren.
Paul Robinson
Hi Darren,
The delay in updating the count is due to the caching and is completely normal. You’ll have to use the clear cache button each time you make any changes that alter what or how many Tweets are returned. If not it will change after 30 minutes (the normal cache time).
The title changes instantly because that isn’t cached. Only the Tweets are cached as Twitter only allows a certain amount of requests per hour so caching helps avoid using them all.
Linux is the preferred platform as that is the one I develop for, however I do develop on a local server that is running on Windows 7 so I don’t think that will make much of a difference. I would still recommend using a Linux server, but it shouldn’t cause any problems.
The only thing I can think of that would cause missing tweets is having retweet display turned off. This is actually a problem with Twitter’s API. When you ask for 10 Tweets if 3 of them were retweets & you have retweet display turned off you will only get 7 back. Unfortunately there isn’t a way around this problem other than showing retweets.
If you are showing retweets then it looks like you may have found some sort of bug & it will take some investigation. If that is the case & you would be willing to help me with finding the problem it would be much appreciated. 🙂
Let me know if that helps & what happens and we’ll go on from there. 😉
Darren Goldsmith
Hi Paul
Thanks for your speedy response! And aha, that caching thing makes sense… 🙂
I didn’t have ‘Show Retweets’ on… and doing so makes all the difference to the number displayed, so thanks again.
Does the 30 mins cache time mean that the stream isn’t really ‘live’ though? That is, if a Tweet is posted, it won’t show up for 30 mins in the stream? I’m sure I’ve seen other sites where the stream is updated almost instantaneously.
Also, at the moment, the stream is only showing the Tweets my wife makes @someone. I thought it would also show those @MrsGoldsmith? Or am I getting that all wrong?
Cheers,
Darren.
Paul Robinson
It does indeed mean the stream isn’t updated as ‘live’. The other sites may be whitelisted which gives them a massive amount of API requests to use. We normal users only get around 150.
With the new oAuth system your API limit is counted as your own though instead of as the servers. So you could edit the cache time and change it to 1 minute and you would still have 50 API requests to spare when it reset after 1 hour.
I am trying to add in a option in the admin & widget so you can change the cache time, but it’s been causing me some difficulties for some unknown reason.
You can change the caching time but until I can get that edit done it would require you to edit the time inside the file. If you want to do that let me know & I’ll write out the instructions. The only problem is it would be undone if an update was released.
The Home timeline shows you tweets @s and @s to you. I use the User Timeline to get the Tweets. I would change it, but using the Home timeline requires the user to login/authenticate and some people still don’t trust the oAuth system. I will be changing it in the next version though.
I hope that helps answer some of your questions & I’m gonna try to get that update done within the next few weeks.
Darren Goldsmith
Hi Paul
Once again, thanks for your amazingly speedy response! I think it probably makes sense to wait for your planned update/edit to enable cache time changes. I’m not that confident about changing the code inside the file! 🙂
I’m still a little confused about what should show up in the widget stream. Currently I’m seeing everything sent from @MrsGoldsmith… but nothing to that ID. Do I have to activate any other option to see these?
Cheers,
Darren
Paul Robinson
The stream will only show normal tweets, at replies made by you and retweets by you. It won’t sow at replies to you. Only the home timeline does that and the plugin uses the user timeline as some people dont like the authorization system you go through and the user timeline will work without authorization whereas the home timeline won’t.
Does that make sense? I’ll try and get that update out as soon as I can but it might be a week or two. Sorry.
Darren Goldsmith
Hi Paul
OK, right… that makes sense. Just out of interest, what kind of authorisation system is required to show those types of replies, then? Is it something that every site visitor needs to allow… or merely something the site owner needs to allow? And why would anyone be uncomfortable with that? Is it a security risk?
Shame, really… since I believe both types of replies would look nicer, i.e. it’d be better if the stream wasn’t one-sided.
Apologies for all the dumb questions, by the way!
With regard to the update… as and when is perfectly fine!
Thanks again.
Darren.
Paul Robinson
The authorization would be the same as it is now. Just some people have an aversion to using oAuth and prefer no authorization. I never understood why and that’s why in the update I’m discontinuing support for using without going through the authorization system like you did.
Thanks its just been really busy recently so I haven’t had much l time to do updates. 🙁
Paul Robinson
Yup I’m going to swap to the home timeline which I believe shows at replies made to you. I can’t be sure it does until I come to do the update but i believe that’s how Twitter have it set up.
Not sure what happened to your comment WP seems to be having one of it’s eccentric moments.
Paul Robinson
Just to let you know that I’ve updated the plugin with a cache time setting. I’ve also changed it so you are required to do the oAuth (which you’ve done).
Unfortunately Twitter don’t have a way to show @ replies to you and you tweets together. The home timeline just shows everyone you are followings tweets. 🙁 Sorry.
Emiel
Hi,
Ever since the update I get an error message saying something like “failed to open stream: Permission denied in…bladiebla”
When I try to delete the cache via the button it says cache deletion failed. I’m guessing it has something to do with ftp-rights on a folder? Any help would be appriciated.
Tnx!
Emiel
Ha just typing that made me realise I could easily check my own guess … and guess what … it worked. So never mind, solved it!
Tnx again 🙂
Paul Robinson
Yep that’s normally the cause of that error. Glad you figured it out. 😉
I try my best to make the file writeable & readable, but sometimes servers just don’t want to allow it or like it & you have to do it manually. 🙁
yavuz selim elmas
as you show at my homepage :http://yavuzelmas.org/ , I can not use you application . and I can not delete cache , how can I solve this problem
thank you , very much
Paul Robinson
Can’t see Twitter Stream on your site, normally though problems like that are due to permissions.
Try chmodding the Twitter Stream folder to 755.
icute
i want to use your plugin but when registering with twitter i got this warning:
“You might be wanting to put a custom protocol in your callback url.
Please leave this field blank and email us at api@twitter.com with your desired callback url and this application’s consumer key and we’ll add it for you.”
i have input the callback url that provided in the plugin after installed.
One more question, what to put in Application Website field? it says “Where’s your application’s home page, where users can go to download or use it?” the download word confusing me, need ya help thanks 😉
Paul Robinson
Hi,
I’m not sure why Twitter would say that. I would say make sure you have the ‘http://’ on the front of the callback URL as it seems Twitter thinks it is being told not to use HTTP protocol.
The URL can normally just be the URL to your website. It just says Download as you can also make desktop Twitter apps.
Let me know if it still doesn’t work & I’ll try and see if there are any errors in the plugin itself.
icute
Hi Paul,
It seems like, the plugin is clashing with the “maintenance mode” plugin. I deactivate the plugin and register again with twitter and it works like a charm.
Thanks for your quick reply and the explanation of “download” there hihi 😉
Paul Robinson
If you had the maintenance plugin active then it would cause problems as Twitter wouldn’t be able to contact the callback URL, because to anyone but you your site is unavailable.
Twitter needs to check the callback is accessible so that would be why it had problems while the maintenance plugin was active.
I hope that makes sense… It even confused me a little. 😆
icute
well, sorry then if i had ring you a bell hihi… 🙂
Ive tried many twitter plugin before but none works best like yours, m gonna stick with ya plugin for my other sites 🙂
tqvm
Rob
I just uploaded your newest version of tweet stream and it crashed my site. My site http://www.rwemarketing.com is down and I cannot access the admin features either. I am not a techie so adjusting code is not my strength.
I need this fixed as soon as possible. Any ideas?
Here is the error the update is causing
Fatal error: Cannot redeclare class OAuthException in /home5/rwemarke/public_html/wp-content/plugins/twitter-stream/twitteroauth/OAuth.php on line 8
Tried to send you an email but the validation code is busted
Paul Robinson
Just checked the contact form and the captcha is working fine. Not sure why your having problems.
The error your getting is caused by a setting on your server. Your server has oAuth installed and my plugin tries to add it again. Since not every server has it installed I have to provide it.
I’m sure someone already had this problem though and I thought i’d added a fix. I’ll check & either up a fixed version or get back to you.
Sorry for the problems, if you need to get back to your site ASAP you can log in via FTP and delete the Twitter stream folder and it should enable you to get back in.
Paul Robinson
Just uploaded a fixed version. Since I can’t replicate the error I can’t be sure it will work. Let me know if it helps.
It should appear on the WP server in about 15 minutes.
Trix
New update crashed my testing site with the following error: syntax error, unexpected $end in OAuth.php on line 876
I have added 1 curly bracket on line 874 and the plugin work again.
Just in case that everything is OK pls review your plugin.
Paul Robinson
Thanks for letting me know. Notepad++ decided to not save on me. 🙁
Fixed the error. Let me know if there are any other problems after the update and sorry for the inconvenience.
John O’Shea
Hello, Is it possible to embed the Twitter Stream Plugin into a single Page in a WordPress blog?
Thanks,
John
Paul Robinson
Hi John,
I believe it should be just by creating a page template as described in the WordPress Codex (let me know if you need help) and inserting the PHP function version of Twitter Stream into it. That would mean placing:
somewhere in your created page template.
Hope that helps. Let me know if you need any extra help.
John O’Shea
Hi Paul,
Thanks very much 🙂
John O’Shea
Paul Robinson
No problem.
Laura
I just downloaded you twitterstream plugin and once I finally got the twitter connected, it works beautifully. I really would like to style it, but I’m not sure where to add the CSS stuff. Do I add it to an existing CSS or created a new one? Where should it live and what should it be called? I really appreciated your help. Thank you.
Laura
Never mind, I got it 🙂 Thanks.
Paul Robinson
I was just going to say it up to you. Your themes style sheet or a separate one. I thought I’d still say it though just in case someone else wants to know. 😉
Michael Mason
Hey Paul,
Im loving your Twitter Stream plugin. Very nice, does what it says on the tin and really lifts a page.
BUT (inevitably there is one…) I’m having a small problem with it:
If include a username when I set up the plugin, I get odd output. The opening tag in the <a> link that you write to include the user name in the Tweet should close after you add the date class. But it don’t. It closes after the username is retrieved. Here’s an example of how each renders:
Without username works great:
With username though HTML is not rendering as I’m sure you wished:
Obviously this is then rendered badly by the browser.
Is this a known problem? Is there a quick fix for it? I know a bit of PHP and I think I’ve found where that HTML gets written in your code, so if there were something that I could do – a fix that I could paste in or instructions – I would do that. I want to use the plugin in a project that Im working on for the upcoming general election in Ireland.
Thanks for your time.
Michael
Michael Mason
Sorry, I forgot to include the [lang] tags as instructed. I’ve sent you an email including the HTML for each case.
Thanks,
M.
Paul Robinson
Hi Michael,
Unfortunately the code used to produce the tweets with or without a username is exactly the same. Twitter just doesn’t require the username to be supplied if the user who authorized the plugin is the same as the one who wishes to display the tweets.
I’m not sure where the @_mickmason_ is coming from in the second part as I haven’t programmed Twitter Stream to add anything like that. I’ve just tested using a username on my local server I use for testing Twitter Stream with your username (assuming it’s @_mickmason_) and I’m not getting the same problem. Is the problem occurring with the @_mickmason_ username or a different one?
It’s a very strange problem. I’m not sure where to start with it, lol. If you can provide the username you used to get the problem to occur, I’ll do whatever I can to try and find the problem. If you don’t wish to post it here, feel free to drop me an email. 😉
P.S. If the website you are working is active a link to that would be very helpful, if at all possible. Also don’t worry about the lang tags I added them. WordPress just tends to try to strip all the HTML. 🙁
Paul Robinson
Heh. As a side effect of trying to find a solution to your problem I just found out that the permalinks included on the date aren’t working due to a small change on my part & Twitter’s part.
I think I found out what is causing your problem though. Are you by any chance adding an @ symbol into the username field when specifying a username for the widget? If you are it will cause the exact same HTML error you are getting as I’ve just tested it. I’ll try and add something in to stop it from happening, but you don’t need an @ inside the username field it is your username minus the @ symbol. 😉
Michael Mason
Ah that works perfectly. Excellent stuff.
Thanks a million. I’ll be back for some of your tutorials (and I’m sure more questions) before long.
Not it’s time for the Superbowl…
🙂 Thanks man.
Paul Robinson
Ahh thank god it fixed it. 🙂
Not a fan of the Superbowl myself but enjoy yourself & feel free to throw any questions or suggestions you have for tutorials my way. 😉