Support » Plugin: Simple Twitter Tweets » Error: Cannot redeclare class TwitterOAuth

  • Resolved Kelli Sussman


    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!

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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 ?

    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?

    Plugin Author Planet Interactive


    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

    Great !

    Thanks for your reactivity.

    Thanks for the quick response. Y’all rule!

    Plugin Author Planet Interactive


    Now in 3.0

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error: Cannot redeclare class TwitterOAuth’ is closed to new replies.