Monday 14 September 2015

Twitter API working locally but not Live.

I had this issue recently and could not find and resolutions for it online.


After checking in Firebug > Dom >  I could see this issue


2015-08-25 10:03:24PHP errorPHP Fatal error: Cannot redeclare class OAuthException in jquery-social-stream/twitter.php on line 0 request_id="v-863a6920-4b10-11e5-bfa3-22000a22a668”


The solution for me here was to in the JQuery Social Stream JS file.  There is a class call for OAuthException  .  By wrapping that in an argument that checks whether it exists fixed my issue.




// redclare issue fixed by if statement

if (!class_exists('OAuthException')) {

  class OAuthException extends Exception {

    // pass

  }

}


 



No comments: