Categories

ThinkTwit

Support ThinkTwit

ThinkTwit is open source and developed for free – if you find ThinkTwit useful please help support its future development by making a donation.

PayPal — The safer, easier way to pay online.

ThinkTwit is a Twitter module for WordPress. ThinkTwit uses the Twitter JSON API v1.1 to display recent tweets from one or more Twitter users. It is very simple, yet flexible and easily customised. It can be placed on your WordPress page simply through drag and drop on the Widgets interface or through the use of Shortcode or a PHP function call.

ThinkTwit was created due to a lack of fully functional WordPress plugins that offer the ability to request tweets from more than one user. It was created using a heavily modified version of code written by Anders Ross at Instant Shift with added code changes by Kevin Pajak at kevinpajak.com. Thanks guys, the code has been much appreciated!

Given the code created was so useful, and the lack of plugins that did what we required, it was decided to create a plugin so that we can give something back to the community – we sincerely hope that others can benefit from this!

ThinkTwit was originally developed by Stephen Pickett when he was working for Think Consulting Solutions. Think decided to open source the code and after he left Stephen decided to continue to maintain the code.

Further thanks must go to the following for their assistance in translating ThinkTwit in to other languages:

  • Maria Ramos (at Web Hosting Hub) for contributing Spanish in Spain (es_ES)
  • Ogi Djuraskovic (at First Site Guide) for contributing Serbian in Serbia (sr_RS)

Features:

  • Can be configured from Widgets settings (if displayed in sidebar)
  • Can be implemented using shortcode or Output Anywhere (PHP function call)
  • Contains default slimline CSS for integrated look and feel (can be turned off)
  • Easy to configure and customise (through settings and CSS)
  • Multiple instances can be deployed (like other widgets/plugins)
  • JavaScript is not required (unless no-caching is activated)
  • Can specify multiple usernames
  • Tweets can be filtered by #hashtag or keyword
  • You can select to filter between an AND or OR filter to either show tweets only containing specified usernames and hashtags or any of them
  • Can specify maximum number of tweets to display
  • Can specify maximum number of days back to display
  • Supports no-caching, to prevent caching of tweets by caching engines such as WP Super Cache
  • Supports CURL as a fallback method, if necessary
  • Supports optional caching of tweets and avatars
  • Cache can be manually cleared and will automatically update if the cache is empty
  • Can display the avatar of the Twitter user
  • Output can be filtered (using apply_filters)
  • Can optionally output “Follow @username” links
  • Automated cleanup process that runs periodically according to user setting
  • Internationalised using i18n meaning that if it isn’t in your language it’s easy to translate!
  • Gracefully deals with Twitter errors and adds them to the PHP error log

Roadmap

The following is a list of features (in order) that will be implemented in future releases (struck through items are completed and awaiting release):

  • Add image support (if possible)
  • Add place holder image so in case the correct avatar can’t be found it can use this
  • Hashtag filtering should also filter cache
  • Add option to output published as text, timestamp or not at all
  • Allow configuration of avatar cache time
  • Fix storing of update time in settings when making updates and using multiple widgets
  • Support WordPress multi-site functionality
  • Replace existing caching with WordPress Transients
  • Implement check of last-modified header
  • Replace URL redirection handling code with a check on response codes

Updates are usually made every 1-2 months but may take longer due to this being a side project – that said, urgent issues are usually resolved much sooner, so please Contact me if you have an issue. And please remember that this is just a side project that I undertake in my own time outside of my very busy day job; donations are always welcome!

Download
ThinkTwit is hosted at WordPress Plugins.

72 replies on “ThinkTwit”

Hi Jeffrey,

Yes of course I can help. If you are using a caching engine it should still get the images though they may not be up-to-date, however you could always try turning on “no caching”. If this doesn’t work please give me a link to your site and I will try to help you debug it.

Stephen, a bit of an update:

The images seem to show now, but now consistently. Perhaps it has something to do with the caching plugin, or perhaps the Twitter feed updates. Not exactly sure? If I check my blog right now, it’s working fine, if I check it again in 30 minutes, the images won’t be showing.

Also – would it be possible to make the links in the tweets nofollow?

Finally – I also want to increase the padding above the title of the sidebar widget. As it stands right now, the “Latest Tweets” title sits too close to the first tweet. Can you help there as well?

If you want to email me, that would be great, or we can continue to exchange comments here until we reach a solution.

Cheers and Many Thanks,
Jeffrey

Hi Jeffrey,

Are you making many requests to Twitter? This may happen if you are not using caching (in ThinkTwit settings) and you have a lot of regular visitors. I have experienced this inconsistency as well on another site I run and feel that it is probably down to the number of requests, and so caching of meta data (names, images, Twitter feed URLs etc.) is on my list of to-do’s, but before that I’m working on code to improve upgrades.

You can make links nofollow by using a filter, see: http://digwp.com/2010/02/remove-nofollow-attributes-from-post-content/

As for the padding above the title by setting the margin-top of the widget-title class in your css, e.g. thinktwit-3 h3.widget-title { margin-top: 20px }

Happy to continue through exchanging comments in case anything we discuss is useful to others.

Hey Steve.

I’m trying to get ThinkTwit set up via the PHP Function Call, but i’m having no luck. Any advise would be helpful as to how to set that up.

Thanks.
-Mike

My tweets have stopped feeding to the website. Is it something I did or is it twitter? It is set to Live(cached), prevent cached is set to NO, use curl is set to YES, output debug is set to NO. If you need anymore info let me know.

Hi Patrick,

It’s quite possible that there was a problem with Twitter at the time but if you are using caching it should be ok. If your web server will allow you to use file_get_contents() then you shouldn’t need CURL and it could be that CURL is not allowed, so you might want to try setting Use CURL to no. Failing that set debug to yes and post me a copy of the output, I will help you to work out what is wrong.

Hi Stephen

I really like the ThinkTwit plugin, but as of late it has been giving me fits. Basically, I turned off my caching plugin, and now I can’t get ThinkTwit to show the icons for the various sites that I am listing Tweets for. If you take a look at my site, you’ll see what I mean. It’s very much hit-and-miss. I am also getting the following in my error logs:

[29-May-2012 19:43:01 UTC] PHP Warning: file_get_contents() [function.file-get-contents]: Couldn’t resolve host name in /home/mysite/public_html/wp-content/plugins/thinktwit/thinktwit.php on line 369

[29-May-2012 19:43:01 UTC] PHP Warning: file_get_contents(http://twitter.com/users/PreventionMag.xml) [function.file-get-contents]: failed to open stream: operation failed in /home/mysite/public_html/wp-content/plugins/thinktwit/thinktwit.php on line 369

Are there some tweaks I can make to my .htaccess file that would help?

Awaiting your guidance and advice with thanks!

Jeffrey

Hi Jeffrey,

I think this may be the same issue that a number of people are getting which is due to be fixed in an upcoming release – and that is images are not cached with tweets. I will try my very best to bring this to the front of the queue and get it fixed very soon – as you know my job is extremely busy at the moment and I’m not getting much free time but I will try to get it done soon (hopefully this weekend).

Great find, thanks for sharing this plugin! I made a small donation.
I slightly modified the code to add support for hashtag filtering. You can enter a hashtag in the widget and only tweet with that # are shown Something I needed for a project. Your code is well written and documented and it was easy to do. Something you could consider to add in the future. It should also filter out the hashtag itself out of the tweet and not show it.

One other note, maybe I didn’t read the instructions well enough, but I also had avatars not showing at first and thought it was a bug. But of course I didn’t have the correct write settings on the /images folder in the plugin directory. Changed CHMOD to 777 and it’s all fine.

Cheers!

Hi Martijn,

Thanks very much for your donation, it is the first I have had and really, really appreciated! 🙂

Thanks also for your feedback and I’m glad you found the coding and documentation well written. It is actually on my todo list to add #hashtag filtering, if you would care to share that code I’d be happy to include it. Also if you have any other changes you’d like I’d be happy to make them also.

I will take a look at improving the instructions/functionality of the images folder – there is code in there to change the permissions but it doesn’t always work.

Thanks again!

Hello,

It no longer seems to be working, probably due to the fact Tiwtter updated their API again. Any fixes for this around the corner :-)?

Hi Martin,

Have you updated to 1.4.1 and added your Twitter API application credentials? If not please do this and let me know if it has resolved the issue, otherwise please let me know and I’ll help you to debug it.

I thought I did (had to update a whole bunch of stuff) overlooked your plugin LOL. Stupid me! It works fine :-D.

Thanks for getting back to me so quick though! It’s appreciated.

Steve, I cant get ThinkTwit to work at all for me. It just keeps saying “There have been no recent tweets” when obviously there has been. In the settings, I tried both a user and hashtag, and with and without the @ and #. What gives?

Is it possible to add a word exclusion list to your plugin? I love the plugin and it works great, but it occasionally pulls in some “unsavory” content. It would be great to have a keyword/hashtag/user exclusion list.

Hi Stephen,
great plugin, thanks for making it. Im relatively new to WordPress and struggling to get the shortcode working – Its pulling in your tweets. Where am I going wrong with the below code?
[thinktwit

hashtags="freeletics"
limit=10
max_days=3
update_frequency=-1
show_username=username
show_avatar=1
show_published=1
show_follow=0
links_new_window=1
no_cache=1
use_curl=1
debug=0
]

Hi Aaron, sorry for the delay in getting back to you and thanks for the positive feedback. I certainly could add an exclusion list to ThinkTwit, I’ll add it to the roadmap. Thanks for the suggestion, it’s a great idea!

Hi Colin, sorry for the delay in getting back to you, I’ve been extremely busy lately. I hope you have fixed your issue by now but if not it’s because you’ve used “show_username” instead of “show_author”.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.