Simple Twitter Tweets
[resolved] Error: Cannot redeclare class TwitterOAuth (7 posts)

  1. Kelli Sussman
    Posted 3 years ago #

    I have two instances of the Simple Twitter Tweets widget displaying from two different users on my homepage. Most of the time, both load fine. But about 10% of the time I get this error message for the second widget:

    Fatal error: Cannot redeclare class TwitterOAuth in /home2/volufire/public_html/wp-content/plugins/simple-twitter-tweets/twitteroauth/twitteroauth.php on line 15

    I've looked at all my other plugins loaded and don't think any others are loading the OAuth -- is it possible that I can't use two instances of this widget on one page? here is the site:

    Thank you for your help!


  2. Michel Vertige
    Posted 2 years ago #

    I had the same problem. Its because some other plugin also uses the Twitter OAuth API, and uses the same class to deal with it.
    I could fix it by editing the simple-twitter-tweets.php file, on line 408, replace this :

    include 'twitteroauth/twitteroauth.php';


    if ( ! class_exists('TwitterOAuth'))
        include 'twitteroauth/twitteroauth.php';

    This should be included in a future update of the plugin…
    Dear plugin developer, could you merge this fix into the main branch ?

  3. notjoeflynn
    Posted 2 years ago #

    I'm also having this issue, though I'm disinclined to hack on a plugin for fear of it breaking on update. Are there any plans to resolve this soon?

  4. Planet Interactive
    Plugin Author

    Posted 2 years ago #

    Michel, Good catch - minor oversight on our part, thanks for this it's now on the list and will be in next update.

    notjoeflynn go for it - it will be in the next update as documented above.

    Thanks again

  5. Michel Vertige
    Posted 2 years ago #

    Great !

    Thanks for your reactivity.

  6. notjoeflynn
    Posted 2 years ago #

    Thanks for the quick response. Y'all rule!

  7. Planet Interactive
    Plugin Author

    Posted 2 years ago #

    Now in 3.0

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Twitter Tweets
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.