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:

The only people who put up a Conservative stakeboard in my ward when I ran in 2012 have just asked for a @LibDems @PaulaWFerguson one... ๐Ÿ™‚ #Paula2Win

About 6 hours ago from Martin Tod's Twitter via Twitter Web App

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

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

The only people who put up a Conservative stakeboard in my ward when I ran in 2012 have just asked for a @LibDems @PaulaWFerguson one... ๐Ÿ™‚ #Paula2Win

About 6 hours ago from Martin Tod's Twitter via Twitter Web App · reply · retweet · favourite

And the latest version goes for the official look:

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

The only people who put up a Conservative stakeboard in my ward when I ran in 2012 have just asked for a @LibDems @PaulaWFerguson one... ๐Ÿ™‚ #Paula2Win

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

The only people who put up a Conservative stakeboard in my ward when I ran in 2012 have just asked for a @LibDems @PaulaWFerguson one... ๐Ÿ™‚ #Paula2Win

You can also search:

[rotatingtweets search='#secretcourts']

Free trade with climatechange denying US will be a horror show. It will prevent us from tackling #ClimateCrisis #ClimateEmergency It will bring more #Privatisation #deregulation #secretcourts It'll be a race to the bottom. It needs to be stopped. huffingtonpost.co.uk/entry/wh…

About 3 days ago from T Denhof's Twitter via Twitter for Android

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.

522 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?

  24. Natasja says:

    I have the plugin running on my website, and it’s working well. But when I click on the link for ‘answer’, a blank tweet-screen appears without reference to my Twitter username, and by clicking the links ‘retweet’ and ‘mark as favourite’, I get a screen that says the page is not found. Second, is there a way that I can translate the line ‘About [datestamp] ago from [username]’s Twitter’ into Dutch?

  25. Dipak saraf says:

    Hey

    I am using Rotating tweet on this site, using widget, but the tweets are not rotating as I can see.

    Can you suggest where the problem might be?

    • Martin says:

      Sure. You have a template that loads a lot of JavaScript including /wp-content/themes/Avada/js/jquery.cycle.lite.js

      This overwrites the version that Rotating Tweets is using and stops the plug-in rotating. Sometimes it can work if you use a fade transition only, but not always.

      Do you have the latest version of the template?

      • Dipak saraf says:

        Yes, the theme is latest version of theme which I am using on this site.

        Suggest the solution, to resolve it. BTW am using the fade transition only.

        • Martin says:

          It’s very hard to fix without knowing how the Avada template adds the jquery.cycle.lite.js script.

          There should be a line in /wp-content/themes/Avada/functions.php that says something like:

          wp_enqueue_script(
                  'jquery-cycle-lite',
                  get_template_directory_uri() . '/js/jquery.cycle.lite.js',
                  array( 'jquery' )
          );

          Can you tell me what it says?

        • Dipak saraf says:

          There is a call to avada theme in line 1390-95 in rotatingtweets.php file which you have asked.

          In which file does wp_enqueue_script(โ€˜jquery.cycleโ€™) get included? it is in function.php file of the theme.

          Finally, what name is the avada theme given on /wp-admin/themes.php

          Current Theme
          Avada Child – Child theme for the Avada

          Actually sorry for being late on updating on this.

  26. John Millis says:

    Hi Martin,

    I have been using the rotatingtweets plugin successfully a website (which I am webmastering) for some weeks now.

    However, since soon after 23 May 2013, it stopped picking up new tweets. When I go to the admin page, re-enter the consumer and access keys, etc, and click Save Changes, after around three seconds, the page loads with the error at the top saying “Error message received from Twitter: connect() timed out!”.

    (I have removed the rotating tweets display from the website until this fixed, through, of course, the plug-in is still installed.)

    My concern is that the site is on a shared server and, perhaps, one of the other sites on the server has been misusing the Twitter API and now the server is blacklisted. (I read somewhere that is a server is blacklisted by the Twitter API, then the API does not respond, hence, timeout.)

    Do you think this could be a cause for this timeout error? If so, how can I go about unblacklisting the shared server from Twitter?

    To check the application on the Twitter account is working, I used Apigee Twitter API tester at https://apigee.com/console/twitter to test authentication and connection to the application. That works fine.

    Any ideas?

    I am very impressed with your plug-in, and hope this can be solved. I believe the problem is not with the plug-in, unless something has changed in the API since 23 May.

    Many thanks and best regards,
    John Millis

    • Martin says:

      John,

      What shows up in the HTML? Is there an error message there? It could be a server issue rather than a Twitter issue.

      The server should no longer be an issue if you are using your own API settings.

      Martin

      • John Millis says:

        Hi Martin,

        Thanks for your reply. I have copied out the HTML that may include a useful error message. I guess a HTTP request failure could be related to my hosting server.

        (I pasted the HTML with blockquotecite tag around it. It that right for quoting HTML on your forum?)

        Error message received from Twitter: connect() timed out!. Please check your API key, secret, token and secret token on the Twitter website.

        Having done further tests such as trying to connect to my own Twitter account instead of that of the website I am webmastering, I suspect the issue is server related as neither connect.

        Many thanks,
        John

        • John Millis says:

          How to I stop my HTML copy/paste from rendering so you can see the error message behind it?
          There’s a div with this as the id: setting-error-rotatingtweets-api-http_request_failed.

        • Martin says:

          Try installing the Core Control plug-in and disabling cURL. You can read more about the problem via this support page.

        • Martin says:

          PS: The best way to get the HTML is usually via ‘View Source’ – and then posting the code within <code></code>

          • John Millis says:

            Thanks Martin. I will try those ideas.

            I got the HTML from viewing page source, but did not consider the

             

            tags.

            John

          • John Millis says:

            Thanks Martin.

            Do you think I will be able to disable cURL while on a shared server?

            The site is hosted by Hosting24 and their support desk is quite quick, I will ask them if needed. I have already logged a support ticket to check if they are aware of anything potentially stopping HTTP requests from my site.

            John

          • Martin says:

            It’s only switching off cURL in WordPress, not on your server, so it’s worth a try.

            Martin

          • John Millis says:

            Hi Martin,

            I have installed Core Control, disabled cURL and enabled the HTTP logger.

            When saving settings in the Rotating Tweets admin page, I no longer get the connect() timeout message. The connection appears to work, but takes some 15 seconds. When I originally setup Rotating Tweets, I remember it being much quicker.

            The actual tweets output is still not picking up tweets made since 23 May.

            The HTTP logger shows the following GET message is generated when Rotating Tweets / Save Settings is used. (I have blanked my keys, though can send them to you by email for testing if it helps.)

            The logger says the result status is Draft. I would expect 200-OK. So, could still be timing out but at a different layer. When cURL is enabled, the result status is “error”.

            GET https://api.twitter.com/1.1/statuses/user_timeline.json?oauth_consumer_key=AAAA&oauth_nonce=0ea29ac706ca3bff146c711e7e3f414c&oauth_signature=ok5xPS78%2F0hAg9u8D2rl%2Bs8p%2FFg%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1370985071&oauth_token=BBBB&oauth_version=1.0

            Thanks again for your time with helping me out. It is very much appreciated.

            John

          • Martin says:

            If you haven’t picked up since May 23, it could be the ‘Verify SSL connection to Twitter’ setting. What happens if you switch that off?

            Martin

          • John Millis says:

            Thanks for the quick reply. I have tried SSL verify off, still 15 seconds and status “draft” on saving settings.

            Same delay also present when browsing my homepage which is where the tweets widget is located. (Because of that, I have removed it for the time being.)

            Did anything significant change on Twitter side since 23 May?

            In the meantime, I am pushing Hosting24 for clues on their side. They normally respond quickly, but on this case they are very slow, so I figure they are still trying to work it out.

            John

          • Martin says:

            Now that’s a thought.

            Here’s the Twitter API Calendar https://dev.twitter.com/calendar

            On May 24, they moved to requiring a host header on all HTTP 1.0 requests (not that I have much idea what that means!).

          • John Millis says:

            Hi Martin,

            I have read the detail and Twitter are saying the requests need a header entry “Host: api.twitter.com”. The API test at http://www.apigee.com seems to include this.

            On the other hand, Hosting24 has got back to me and are saying they believe Twitter has blocked their server IPs, they have asked Twitter to unblock those.

            Hosting24 right now is being very sluggish getting into CPanel, etc, so I will get back to this tomorrow.

            John

  27. Tom Kay says:

    Hi Martin,

    Thank you for the plug ni, it was working fantastically until one day….

    WordPress database error MySQL server has gone away for query UPDATE `wp_options` SET `option_value` = ‘a:11:{s:13:\”MCHFootball00\”;a:2:{s:4:\”json\”;a:41:{i:0;a:23:{s:10:\”created_at\”;s:30:\”Thu May 16 14:47:11 +0000 2013\”;s:2:\”id\”;d:335043759412760576;s:6:\”id_str\”;s:18:\”335043759412760576\”;s:4:\”text\”;s:140:\”You can get a quote for #coach hire using our online quotation system at http://t.co/a2Rpa44hR4 or by calling us on 0800 987 8052 #transport\”;s:6:\”source\”;s:3:\”web\”;s:9:\”truncated\”;b:0;s:21:\”in_reply_to_status_id\”;N;s:25:\”in_reply_to_status_id_str\”;N;s:19:\”in_reply_to_user_id\”;N;s:23:\”in_reply_to_user_id_str\”;N;s:23:\”in_reply_to_screen_name\”;N;s:4:\”user\”;a:39:{s:2:\”id\”;i:1198084116;s:6:\”id_str\”;s:10:\”1198084116\”;s:4:\”name\”;s:12:\”MCH Football\”;s:11:\”screen_name\”;s:11:\”MCHFootball\”;s:8:\”location\”;s:2:\”UK\”;s:11:\”description\”;s:158:\”We provide private coach hire for football trips within the UK and mainland Europe, wherever you\’re leaving from. Give us a call on 0800 987 8052 for a quote.\”;s:3:\”url\”;s:22:\”http://t.co/kUSAufc7fx\”;s:8:\”entities\”;a:2:{s:3:\”url\”;a:1:{s:4:\”urls\”;a:1:{i:0;a:4:{s:3:\”url\”;s:22:\”http://t.co/kUSAufc7fx\”;s:12:\”expanded_url\”;s:32:\”http://www.momentumcoachhire.com\”;s:11:\”display_url\”;s:21:\”momentumcoachhire.com\”;s:7:\”indices\”;a:2:{i:0;i:0;i:1;i:22;}}}}s:11:\”description\”;a:1:{s:4:\”urls\”;a:0:{}}}s:9:\”protected\”;b:0;s:15:\”followers_count\”;i:74;s:13:\”friends_count\”;i:484;s:12:\”listed_count\”;i:1;s:10:\”created_at\”;s:30:\”Tue Feb 19 17:25:35 +0000

    Have you seen anything like this before? Any hints?

    • Martin says:

      Tom,

      Have you tried a lot of combinations of tweet settings? In certain cases, that can lead to the MySQL database size getting too big. The latest version of the plug-in should clear these, but I’ll do you a special version if it doesn’t.

      Martin

  28. Maxim says:

    Martin, how do I set the width of the widget? (e.g. width=”100%” or width=”900px”) ?

    On my homepage http://www.MaximSeninMusic.com in the footer, it doesn’t stretch horizontally.

    • Martin says:

      It’s currently matching the width of the widget container in your theme. What happens if you add:

      div.widgetf,
      div.widgetf div.inner,
      div.widget_rotatingtweets_widget {
         width:900px;
      }

      One of those should work! ๐Ÿ™‚

  29. victor says:

    Hello Martin.

    First of all, thank you for this awesome plugin.

    I have a problem. I used the settings from my own twitter application to test the plugin and when I’m trying to change it with other configuration it keeps the first settings.

    How can I change it?

    Thank you for the support!

    • Martin says:

      That sounds very odd. Does any message appear when you hit save with the new settings?

      In general though, unless you’re expecting very heavy traffic and there’s a risk of rate-limiting, it shouldn’t be a problem if you keep the same Twitter app settings – since they don’t determine what gets shown. Those are determined by the widget or short-code settings.

      Martin

  30. Joel Eade says:

    Hi Martin,

    A well earned pat on the back for this simple yet flexible plugin. Exactly what I needed!

    I’ve just donated via the WordPress plugin page. Your next coffee or pint is on me! ๐Ÿ™‚

    Thanks again,

    Joel

  31. sreid says:

    Sorry to ask what I imagine is a basic question; I’m totally new to WordPress and themes and plugins. I believe I want to use the [rotatingtweets screen_name="screenname" official_format='1'] shortcode but it’s not clear to me how to use a shortcode. Do I add this shortcode to a php file? Thanks for any assistance.

  32. Pir Farhad says:

    i want php short code of this plugin.. where can i get

    • Martin says:

      There are two ways to do this:

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

      or

      <?php
      rotatingtweets_display( array('screen_name'=>'mpntod') );
      ?>

      Variables are here.

  33. Prajyot says:

    Hey Martin,

    Thanks for the great plugin.
    I am creating a website using asp.net and I was just wondering , Is there a way I can use this in my website?

    Thanks,

    Prajyot

    • Martin says:

      If your host has PHP installed on your .net server, then you can install WordPress – add the Rotating Tweets plug-in to it – and it should run fine.

      As far as I know, without that, PHP plug-ins can’t run in ASP.net without rewriting into ASP.

  34. Jan says:

    Hey Martin,

    Thank you very much for this great plugin. It works perfect. I was wondering if there is a possibility to limit the shown tweets for example to the last 14 days?

    Thanks!

    Jan

    • Martin says:

      Tricky. The only way to do it is using the search function – for example:

      from:twitterapi since:2011-05-09

      but you would need to keep updating the date! Twitter doesn’t have a way to limit to a set number of days currently.
      What do you want to set a 14 day limit?

  35. Ying-Fu Li says:

    Hi,

    Nice plugin. I do have one question: the follow-button sits rather tied on the widget border. Is there a way to add some padding or such? The website: http://tafeltennisprimeur.nl

  36. Robert says:

    My feed will not rotate in any browser. What am I doing wrong?

    • Martin says:

      Main problem is that this script http://harrisoncountytexas.org/wp-content/themes/wppolitico/scripts/scripts.js has its own copy of jQuery in it.

      Is there a more up to date copy of the template available?

      If not, the simplest solution would probably be to delete line 23 of it (the bit that begins:

      (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F)

      and ends:

      if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
      • Robert says:

        I really prefer your rotating tool but still can’t get it to work. If I remove line 23 in my jQuery file then the rotating sliding images stop working. Is there anything else I could try? I’ve contacted my theme creator and he confirmed that removing line 23 will break other things in the site.

        • Martin says:

          Hmmm. Not sure.

          The other option is to use the jQuery.cycle2 script to run the images (since it can easily do this).

          All you would need is change:

          <div class="backgrounds">
          </div>

          to:

          <div class="backgrounds cycle-slideshow" data-cycle-fx="scrollHorz" data-cycle-speed="500">
          </div>

          and

          <div class="details">
          </div>

          to

          <div class="details cycle-slideshow" data-cycle-fx="scrollHorz" data-cycle-speed="500">
          </div>

          What happens if you remove

          jQuery.noConflict();

          from line 448?

          • Robert says:

            Excuse my newness to this but is there a jQuery.cycle2 file somewhere. The file I was editing was the scripts.js file found in the scripts folder inside the theme folder. I’m comfortable editing the text inside the file but want to make sure I’m in the right place. Thanks.

          • Martin says:

            No. This involves editing the template front page – or wherever the

            statement is added to the page.
          • Robert says:

            Please forgive my ignorance on this but are we talking about editing a file named jQuery.cycle2? I’m comfortable editing files, etc. but just need a little help finding the right file to edit. I’ve been editing the scripts.js file found in the /wp-content/themes/themename/scripts folder. Is that right? Where is thejQuery.cycle2 file if it is a file. Thanks.

  37. jayesh says:

    I always want to display live feeds and not from cache.
    what would i do?

    • Martin says:

      Currently the Rotating Tweets loads the content once – either from cache – or from Twitter directly if the cache is more than two minutes old.

      If you want to change the two minutes to something less, go to line 831 of the plug-in and change:

      $cache_delay = 120;

      to

      $cache_delay = 20;

      for example – and your tweets will never be more than 30 seconds old.

      It uses cacheing to avoid being rate-limited by Twitter in case of heavy traffic.

      If you want completely live feeds you will probably need to use the Twitter widgets since this pulls information directly from Twitter via JavaScript.

  38. Henkie says:

    I got a problem.
    the tweets don’t rotate.
    I followed all instructions.
    Made twitter api.

    could you please check at http://www.explain.name ?

    • Martin says:

      It’s because your theme installs its own version of jQuery which overwrites the ‘regular’ one. This makes the Pinterest script crash – which means that JavaScript has stopped working before the page gets to the Rotating Tweets script.

      So the first step is probably to comment out the line – probably in the header.php file of your template – that reads:

      <script type="text/javascript" src="http://explain.name/wp-content/themes/verticaltheme/js/jquery-1.6.1.min.js"></script>
  39. Valerie Lane says:

    Hi Martin,

    First of all, thanks so much for your rotating tweets plugin. I love it! It was working beautifully, however, two days ago it started breaking the formatting of the page it is on, including removing the WordPress admin bar at the top of the page and making itself and some other widgets disappear. I am running WordPress 3.6.

    You can see the before here: http://coaching.valiantlane.com/wp-content/uploads/2013/08/BeforeRT.png

    and after using RT in a widget here: http://coaching.valiantlane.com/wp-content/uploads/2013/08/After_RT.png

    Thanks for taking a look at this.

    Cheers!

    Valerie

    Any idea how to fix? Would love to keep using RT.

    Valerie

    • Martin says:

      Hi Valerie,

      It looks as if a div or link isn’t getting closed.

      Given that the problem only arrived a couple of days ago and the problem wasn’t occurring before then (and RT hasn’t changed in the last couple of days), I can only think of a couple of scenarios that might make this happen:

      1. There’s something in a Tweet that makes Rotating Tweets break the HTML – perhaps by not closing a link or a div – do you know which Tweet it was – and which format you were displaying under? It would be useful to know all the settings you had in the widget
      2. You upgraded RT and there was something in the change that broke your site
      3. You changed something else on the site and this interacted with RT to have this effect. I can’t actually see RT on the broken page – so it’s hard to see where in RT the problem might be happening.

      It’s impossible to fix this without seeing this problem on the live site unfortunately – but if you send me all the details under point 1 I’ll try and replicate the effect.

    • Martin says:

      One other option. Can you send me the HTML of the Rotating Tweets that break the site…

      Martin

  40. Valerie Lane says:

    Hi Martin,

    Thanks so much for your quick response. This happened on the 28th. I had not tweeted since the 26th. It happens using the widget in the sidebar and when this code [rotatingtweets screen_name='valiantlane'] is placed in content area. I made a test page for you: http://coaching.valiantlane.com/test-rotating-tweets.

    Re the HTML, I looked at the page source as well as examined both content and sidebar areas with firebug and can’t even find the code or reference to the plugin in either place. Maybe you will have better luck???

    I also deactivated, deleted, and then reinstalled the plugin and this is still what’s happening.

    Hmmmmmmmm….

    Valerie

    • Martin says:

      Wow! That’s pretty nuclear. It appears to be crashing the site before displaying anything.

      It’s not a problem with the Tweets because your feed is working at http://www.martintod.org.uk/blog/?p=96

      One suggestion would be to switch on debugging to see what it shows in the code.

      If you go to wp-config.php and change

      define('WP_DEBUG', false);

      to

      define('WP_DEBUG', true);

      you will get a bunch of extra error messages (probably not just from Rotating Tweets) which may give a clue…

  41. Valerie Lane says:

    Very interesting, isn’t it. Plus it only crashes the page it is on. I will try debugging tomorrow and let you know what happens. Thanks for the suggestion!

    • Martin says:

      That would be great. If we can find out where the problem is I can put in a fix to sort it out.

      I can only think that one of the saved options might have got corrupted somehow. One way to check this would be to try another Twitter name and see if that works.

  42. Valerie Lane says:

    Hi Martin,

    Tried using another twitter account and same thing happens.

    Looks like the errors all have to do with how the theme handles plugins. See results of debugging at http://coaching.valiantlane.com/test-rotating-tweets. Is that what it looks like to you?

    Valerie

    • Martin says:

      Yes. Although I’m about to get on a plane so you may want to switch off WP_DEBUG for a bit until I get back to the UK. The important bit is in the HTML at the end:

      <!-- There are currently 1 identities cached -->
      <!-- var option is an array --><!-- option[valiantlane00] does not exist -->
      <!-- Using OAuth - version 1.1 of API - statuses/user_timeline -->

      <!-- Verifying SSL peer -->

      My version of that looks like:

      <!-- There are currently 9 identities cached -->
      <!-- var option is an array --><!-- option[valiantlane00] exists --><!-- option[valiantlane00]['json'][0] is an array -->
      <!-- Using OAuth - version 1.1 of API - statuses/user_timeline -->

      <!-- Verifying SSL peer -->
      <!-- Rotating Tweets - got new data --><!-- Storing cache entry for valiantlane00 in rotatingtweets-cache --><!-- There are currently 9 identities cached -->
    • Martin says:

      It looks like the problem may be caused when it tries to store the cache. When I get back to the UK, I’ll look at creating an option to delete the cache so that you can start again with a clean cache.

  43. Valerie Lane says:

    Thanks, Martin. Safe travels.

  44. Valerie Lane says:

    Hi Martin,

    Thanks so much for the dev version. Tried it and it looks like there is a conflict with another plugin, Ultimate Google Analytics. See http://coaching.valiantlane.com/test-rotating-tweets. I deactivated UGA but problem persisted. Then deactivated RT and it cleared up.

    Your thoughts?

    Valerie

    • Martin says:

      If you view source, then it still looks like Rotating Tweets is the problem.

      It’s getting as far as line 762 = but isn’t getting as far as lines 800, 803 or 811.

      What happens if you comment out line 773? This would suggest we have a problem in lib/wp_twitteroauth.php (probably line 209) or WP_OAuth.php (i.e. the bit of code where RT goes and gets the data).

      Martin

  45. Valerie Lane says:

    Hi Martin,

    I commented out line 773 of rotatingtweets.php (was that the right file to edit?) and it cleared up the formatting issue and returned error message “Problem retrieving data from Twitter.” See at http://coaching.valiantlane.com/test-rotating-tweets.

    I also created new auth keys/tokens for Twitter and changed to them to make sure I was doing the right thing on my end. Problem still occured.

    Thanks so much for your troubleshooting efforts. I appreciate your dedication and commitment to doing great work!

    Valerie

    • Martin says:

      We’re closing in on the problem. What happens if you comment back line 773 of rotatingtweets.php and set ‘Verify SSL connection to Twitter’ to ‘No’? What timeout do you have BTW?

      One further check we can do is to comment back 773 and then comment out 209 of wp_twitteroauth.php. Then we will know roughly where the problem is!

  46. Valerie Lane says:

    When I commented 773 back in and set SSL to no, formatting problem re-occurred. Timeout set at default 3s. Adjusted that stepwise all the way up to 20s and it didn’t make a difference.

    When I commented out 209 of wp_twitteroauth.php with 773 back in, formatting issue resolved and again got the message “Problem retrieving data from Twitter” in the area of the tweet box. See at http://coaching.valiantlane.com/test-rotating-tweets.

    The pdf I sent was before these two steps.

    • Martin says:

      I’ve updated the plug-in to get rid of some extra error messages. I need to add some extra debugging to the wp_twitteroauth.php file – but won’t be able to do it until this evening unfortunately.

      Martin

  47. Valerie Lane says:

    Thanks very much, Martin! Will check back in later.

    • Martin says:

      Incidentally, what is on line 85 of /wpcontent/themes/avisio/framework/theme_plugins/kriesi_option_pages/kriesi_option_pages.php on line 85 ?

    • Martin says:

      The debug has now been turbo-charged! You need to see the HTML to see it – but, for example, it shows exactly what RT calls to get your data – for example:

      <!--
      URL is: https://api.twitter.com/1.1/statuses/user_timeline.json?count=70&#038;exclude_replies=0&#038;include_entities=1&#038;include_rts=0&#038;oauth_consumer_key=1YaWM0zeJJsrcS6yawGNbQ&#038;oauth_nonce=302aa0b96cf385f39b8c7ddd5483153a&#038;oauth_signature=FRh%2BNL2pav9rswQYegQBOkm8bbg%3D&#038;oauth_signature_method=HMAC-SHA1&#038;oauth_timestamp=1378234565&#038;oauth_token=1691801-TxWs7yXGRScAzfZ4DHSxtsDXW2eS1S9FhO0HnypMzH&#038;oauth_version=1.0&#038;screen_name=valiantlane

      $args =
      Array
      (
          [method] => GET
          [body] =>
          [timeout] => 3
          [sslverify] => 1
      )
      -->
  48. Valerie Lane says:

    Just debugged again…here’s the error:

    Notice: Undefined variable: response in /home/vlanec5/public_html/valiantlane.com/coaching/wp-content/plugins/rotatingtweets/lib/wp_twitteroauth.php on line 211

    Will leave the page as is with all the error messages so you can see them: http://coaching.valiantlane.com/test-rotating-tweets

    Also put lines 73 – 100 of the kriesi_option_pages.php into the body of the rotating tweets test page. Ln 85 is:

    if($option[‘std’])

    Sent that error to theme developer forum staff to see what they had to say about it. Haven’t heard back from them yet.

    • Martin says:

      Easy things first. Trying changing line 85 to:

      if(isset($option['std']) && $option['std'])
      As for the rest, I've found a bug in lib/wp_twitteroauth.php which I've fixed and further improved the diagnostics - so if you upgrade to the latest development version, it <em>may</em> now work!

Get in Touch

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

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