Skip to content

Loading…

Exception not caught #146

Open
emuki opened this Issue · 5 comments

2 participants

@emuki

Hello,

I wonder what I get wrong here but this piece of code fails to catch exceptions:

include 'epiTwitter/EpiCurl.php';

include 'epiTwitter/EpiOAuth.php';

include 'epiTwitter/EpiTwitter.php';

include 'epiTwitter/secret.php';

$twitterObj = new EpiTwitter($consumer_key, $consumer_secret);
try

{
header("location:".$twitterObj->getAuthorizeUrl(null,array('oauth_callback' => 'http://domainname.com/tweet/')) ."");
}
catch(EpiTwitterException $e)

{

echo"Error connecting to Twitter. We cannot connect you this time. Please try later";
}

Error message:

Fatal error: Uncaught exception ‘EpiOAuthException’ with message ‘An exception occurred in EpiTwitter The response is Twitter / Error in /home/unitefor/public_html/domain.com/epiTwitter/EpiOAuth.php on line 358

Please help on this

@jmathai
Owner
@emuki

Yes. Both are correct. This error is triggered from time to time. Maybe 1 out of every 20 attempts.

@emuki

Hello, any suggestion to resolve this issue?

@jmathai
Owner

simpleTest.php randomly doesn't work? If that's the case then I'm not sure what the problem could be. The code does the same thing every time so I would think it has something to do with the host itself.

Unfortunately, I don't have time to do too much troubleshooting. If you continue to have problems you can always try https://github.com/abraham/twitteroauth

@emuki

Hey, thanks. sounds good to try https://github.com/abraham/twitteroauth
I'll let you know if there is any issue too with this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.