WordPress.org

Forums

oAuth Twitter Feed for Developers
Fatal error: Cannot redeclare class OAuthException (6 posts)

  1. amatoro
    Member
    Posted 2 years ago #

    Hi,

    I have a main issue here. My site has a plugin to allow the users to login with their linkedin, twitter and facebook accounts. At this point only the linkedin one is activated.

    Once i activated your plugin, I got an error on the linkedin one: Fatal error: Cannot redeclare class OAuthException.

    It seems both declare the same class, but i'm not sure on what can i do here to solve it. So i decided to write you as you had more experience.

    Thanks!

    http://wordpress.org/extend/plugins/oauth-twitter-feed-for-developers/

  2. amatoro
    Member
    Posted 2 years ago #

    Also it seems there are several classes that get redeclared. So not sure what to do here...

    Cannot redeclare class OAuthSignatureMethod_HMAC_SHA1

    So i wonder how can i use only one oauth file for the two plugins.

    Thanks!

  3. Liam Gladdy
    Member
    Plugin Author

    Posted 1 year ago #

    This is a conflict with another plugin! We're going to abstract our OAuth library to prevent this happening in the future in the next release!

  4. icecreamdigital
    Member
    Posted 1 year ago #

    Hey,

    I am also getting this error message! Is there a quick fix?

    Appreciate the work btw you have some major downloads on this plugin!

  5. icecreamdigital
    Member
    Posted 1 year ago #

    Fatal error: Cannot redeclare class OAuthException in /home/sites/blahblah.com/public_html/wp-content/plugins/oauth-twitter-feed-for-developers/oauth/OAuth.php on line 8

  6. hakanersu
    Member
    Posted 1 year ago #

    You need to update OAuth.php which can be found here https://github.com/abraham/twitteroauth/tree/master/twitteroauth

    or simply change OAuth.php

    class OAuthException extends Exception {
        // pass
      }

    to

    if (!class_exists('OAuthException')) {
      class OAuthException extends Exception {
        // pass
      }
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • oAuth Twitter Feed for Developers
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.