New twitter plugin – to show tweets in rotation

As tweeted yesterday, I’ve just completed a new WordPress plug-in to show rotating tweets.

It’s easy to add using a widget or a shortcode in a post or on a page such as:

[rotatingtweets screen_name="mpntod"]

and, as a result, you get:

After travelling through Surbiton and New Malden at walking pace, train is now moving again ...

About an hour ago from Martin Tod's Twitter via txt

For a bit more fun, you can add some extra options such as:

[rotatingtweets screen_name="mpntod" rotation_type='toss']

After travelling through Surbiton and New Malden at walking pace, train is now moving again ...

About an hour ago from Martin Tod's Twitter via txt · reply · retweet · favourite

And the latest version goes for the official look:

[rotatingtweets screen_name="mpntod" official_format='1']

After travelling through Surbiton and New Malden at walking pace, train is now moving again ...

[rotatingtweets screen_name="mpntod" official_format='2']
Martin Tod

After travelling through Surbiton and New Malden at walking pace, train is now moving again ...

You can also search:

[rotatingtweets search='#secretcourts']

You can see the widget in action on the top-right of this page.

You can download the plug-in from here.

All this was only possible due to the good people of WordPress, the Twitter API, jQuery and jQuery Cycle - and Syd who showed me jQuery Cycle in the first place  - so a big thank you to them too! :-)

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.
This entry was posted in Technology, Twitter, Wordpress. Bookmark the permalink.

240 Responses to New twitter plugin – to show tweets in rotation

  1. Mark Minor says:

    Same problem with IE9… no rotation of the news.
    Thanks again

  2. Mark says:

    Thanks a lot Martin for your courtesy ahd help.
    What should I do now? I Download the new version of script?
    Let me Know…

    I return on line at 6PM
    Thanks thanks again!

  3. mark says:

    Thank you very much for your help.
    It seems a problem with the slideshow of the theme that is in conflict. Disabling the plugin everything returns to normal.
    Let me know if we find a solution in the meantime.
    The problem no longer exists with all other browsers.
    I hope it’s been useful to report this thing.

    If you have news please let me know… if necessary I send site login information.
    I will send a donation to short … Thanks for everything!!!

  4. Dean says:

    Hi Martin,

    Great plugin! Any idea why the #term links are going to a page not found on twitter? Have they changed something that you need to update in the plugin?

    Thanks

  5. Denis says:

    Dear Martin! At first, thank you for your work! It’s great! And I’d like to ask you why in your plugin don’t work russian hashtags? This is the only weak point.

  6. Jim says:

    Hello Martin,

    First, great plug-in. Unfortunately, I’m running into the “no rotating” issue. I’ve placed the short code on the “about us” page, under a bio pic. Do you have a step-by-step for troubleshooting? Or, can you help resolve if I supply admin rights for a brief period?

    • Martin says:

      Thank you for the compliment! :-)

      If you open the page – press [F12] (in Chrome or IE) or [CRTL]+[SHIFT]+K in Firefox and then go the console, you will see that there’s a problem with the gprofiles.js script that means that the JavaScript ‘breaks’ before it gets to Rotating Tweets.

      I’m not sure if this is caused by gprofiles.js itself – or by some other JavaScript that triggers gprofiles.js to fail. (The gprofiles.js script is associated with showing Gravatars – so if you switch off this function – the page might work again).

      It may also be compounded by having the Rotating Tweets .JS and .CSS at the bottom of the page (which doesn’t happen with the widget, so I’m not entirely sure why it’s happening here!). If you try Rotating Tweets as a widget, it might solve the problem – although it won’t fix the Gravatar script!

  7. MG_Gray says:

    I’d like to use the rotating tweets on my site. I have followed the instruction and created a twitter application and filled in the relevant info on the plug and updated. I am using Twenty Eleven theme and have placed the widget in Main sidebar. Not sure whether what I am doing is actually correct. Please help.

    • Martin says:

      Hi MG_Gray. Thank you for using Rotating Tweets.

      When you saved the settings, what message did you get at the top of the page?

      Also, what screen_name are you using in the Widget?

  8. Vidit says:

    I am using this plugin on site as widget in the sidebar but getting this error message. “WordPress error message: Connection time-out.”

    I am new in wordpress. Please help.

    • Martin says:

      It would be helpful to know which website this is so that I can take a quick look.

      Have you entered all the Twitter API data – as per the instructions?

      • Vidit says:

        Hi Martin,

        I have entered the twitter API data. But I am getting the error.

        The site is not ported anywhere. Its on my local machine only.

        I referred all the things. If I use the witter Feed: Embedded Timeline WordPress Plugin than its working fine..

        But I want to display sliding. Its showing me the error ” couldn’t retrieve the data.”

  9. Tony Assante says:

    Hallo martin…
    I use rotating tweets and is very good
    Only one question please

    now i have 10.000 followers

    why i see on plugin 10k follower ?

    Is possible see the real numbers?

    http://www.doremifasol.org/news/

    Thanks

  10. Tony Assante says:

    Hallo Martin, sorry for my other question…
    Is possible use your plugin with one hashtag and not user?

    My problem is

    Visualizer a live conversation on twitter

    Thanks for your support

  11. Dean says:

    Hi Martin,

    Once again, thanks for a great plugin.

    Question: Has something changed regarding the display of the icons and sub numbers etc, as none of this information seems to be displaying any more when using the “Original rotating tweets layout”, no matter which option is selected.

    Dev page (down in the footer): http://69.195.124.94/~naturcx5/

    Thanks

  12. Jon M says:

    Hi Martin

    I’ve just downloaded and set up Rotating Tweets. It’s a lovely plug-in. Thank you for sharing it. Thanks also for the info about getting the Twitter app keys.

    Jon

  13. Dean says:

    Hi Martin,

    Is there a global setting for making all links within the plugin to _blank?

    For now I’ve adjusted line 1707 of rotatingtweets to be _blank, the same as 1703.

    Thanks

  14. Christopher says:

    Hi Martin, love the plug-in! Just had one question, I’m using the shortcode in a column. Everything is working fine, but what I’d like to be able to do is show more than one tweet at a time. Is there any way to adjust the height of the container to show 3-4 tweets in the feed at a time as they scroll up?

    • Martin says:

      Unfortunately not currently. I’m currently using the jquery.cycle plug-in to handle the rotations and it doesn’t support this. It is possible, but would require a full rewrite of the javascript from scratch…

      Martin

  15. lisa says:

    Hi – thanks for your plugin. Is there anyway to show more than 1 Tweet rotating?

  16. Chris Salt says:

    Hi Martin, thanks for the great plug-in – Rotating Tweets is fantastic!

    Just a quick question though. Apologies if I’ve misconfigured something (I’m new to WordPress) but since the clocks went forward last weekend, my tweets are still showing in the old time (an hour earlier than tweeted). Just wondered if this is my mistake or if this might be a problem?

    Many thanks,

    Chris

  17. Thanks for your nice wordpress-plugin.
    Easy to install, easy to manage.
    Tested it with
    * Chrome Version 28.0.1469.0 dev-m
    * Firefox 19.0.2 and 20.0
    * IE9.08112.16421 with updates 9.0.14
    All working :)

  18. Nathan Hoyle says:

    HI Martin,

    I have pullled in tweets from a list consisting of 3 twitter accounts. I have set the count to ’50′ but it never seems to display any tweets from the other 2 accounts – there are a lot from the first account, but not more than 50 before another account’s tweets should show up. Is there a way to ‘randomize’ the order the tweets are pulled from the list? Or any other solution/suggestion?

    Great plugin!

    • Martin says:

      It could be done, although currently it shows results in reverse chronological order.

      Are you using the short-code or the widget? If the latter, have you set the Tweet type to ‘search’?

      Martin

  19. Gerald says:

    Hi
    Many thanks for your plugin. I am trying to use the widget to show tweets from two accounts as the readme says:
    “= How can I pull information from two accounts into one widget =
    The easiest way is to use a search term like `’from:account1 OR from:account2′`.”
    I just cannot see how to apply this search term to the widget. I can get it to work with either account, but not both.
    Many TIA
    Gerald

    • Martin says:

      Two quick checks:

      • Do you have the latest version of the plug-in?
      • Have you set the ‘type of tweets’ to search?

      Martin

      • Gerald says:

        RESOLVED: Thank you for your prompt response.
        I have updated to the latest version and changed the type of tweets.
        I also had to sort out my interpretation of the syntax for
        from:account1 or from:account2
        and it appears to be working.
        Gerald

  20. Sarah says:

    Hi Martin, thanks very much for Rotating Tweets! It’s working out really well for me. I have a couple of questions though I’ve implemented the plugin in a page template, thus:

    <?php echo do_shortcode("[rotatingtweets screen_name='username']"); ?>

    and I need to know if I till have access to all of the configuration options using that method. I’d like to switch off the tweet source, if possible. I also have activated the ‘sample’ stylesheet, in order to display a blue bird at the left of each tweet, but I’d like that to link to the Twitter feed instead of having a ‘follow’ button.

    Are those things possible? Thanks very much :)

    • Martin says:

      You do. You can put any of the options into a short-code. Indeed, there are more options for short-codes than for widgets!

      There’s no easy change to make the blue-bird to the left link to Twitter, I’m afraid.

      • Sarah says:

        Thank you for your reply, is there a list of the available options and by what reference they should be referred to within the shortcode?

        • Martin says:

          Sarah. There is at http://wordpress.org/extend/plugins/rotatingtweets/installation/

          Happy to help if you have any further questions or if anything is unclear.

          • Sarah says:

            Exactly what I was looking for, thank you! I did manage to link the left-side blue bird to the Twitter user too, so everything’s perfect now. Thanks again! :)

          • Martin says:

            That’s great! (And how did you link the bird? Other people might want to know!) :-)

          • Sarah says:

            Of course :)

            It’s prone to breakage with an update to your plugin, but I altered line 1171 of rotatingtweets.php

            $result .= "\n\t\t<p class='rtw_main'><a href=\"http://www.twitter.com/user_name\" title=\"Follow User Name on Twitter\"><img src=\"".plugins_url('images/bird_blue_32.png', __FILE__)."\" class=\"twitter_icon\" /></a>$main_text</p>";

            and then I renamed yourstyle_sample.css to yourstyle.css and edited it:

            div.rotatingtweets_format_0 p.rtw_main {
                min-height: 36px;
            }
            div.rotatingtweets_format_0 p.rtw_meta {
                padding-left: 38px;
            }

            then added:

            .twitter_icon {
                float: left;
                margin-right: 6px;
            }

            All done :)

          • Sarah says:

            Correction to my previous; I altered line 1171 of rotatingtweets.php. Apologies :)

          • Martin says:

            Adjusted accordingly.

            Are you using it in a shortcode or a widget? Happy to code this permanently in as a shortcode option.

          • Sarah says:

            As per my OP, I’m using it as a shortcode within my template file, thus:

            <?php echo do_shortcode("[rotatingtweets screen_name='username']"); ?>

            With the options I now know how to use, I have:

            <?php echo do_shortcode("[rotatingtweets screen_name='username' show_meta_via = '0' show_meta_screen_name = '0']"); ?>

            :)

          • Martin says:

            Try the latest development version and:

            <?php echo do_shortcode("[rotatingtweets screen_name='username' show_meta_via = '0' official_format='6' show_meta_screen_name = '0']"); ?>

            :-)

  21. Tobias says:

    Martin,

    I just recently installed the plugin though it is not rotating. I checked other comments to filter out the issue though I had no success. Plus, I am not receiving any error messages.

  22. Detlef says:

    Hi Martin,

    thanks a lot for this nice PlugIn. Installed it and it works perfect.
    There is on feature I would like to see: autoexpand the enclosed images of a tweet.

    Again – thank you very much!

    Detlef, Cologne, Germany

  23. Chorley says:

    Hi Martin,

    Great plug in. Does the widget cache tweets, so that it only fetches new tweets once every X minutes, or does it fetch tweets each time a user opens a page?

Get in Touch

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>