How to verify credentials in epi twitter? php Fatal error


#1

I try to verify credentials using $obj->get_accountVerify_credentials();
it works when user token is valid, but returns PHP fatal error if user has revoked his token.

Help!

Fatal error: Uncaught exception 'EpiTwitterNotAuthorizedException' with message '{"errors":[{"message":"Invalid or expired token","code":89}]}' in /home4/EpiTwitter/EpiTwitter.php:263 Stack trace: #0 /home4/EpiTwitter/EpiTwitter.php(226): EpiTwitterException::raise(Object(EpiCurlManager), false) #1 /home4/EpiTwitter/EpiTwitter.php(127): EpiTwitterJson->__get('response') #2 /home4/EpiTwitter/EpiTwitter.php(109): EpiTwitter->request('GET', '/account/verify...', NULL) #3 /home4/public_html/t1.php(111): EpiTwitter->__call('get_accountVeri...', Array) #4 /home4/tweet.php(111): EpiTwitter->get_accountVerify_credentials() #5 /home4/johndooc/public_html/t1.php(3): include_once('/home4/...') #6 {main} thrown in /home4/EpiTwitter/EpiTwitter.php on line 263

#2

This looks to be an intentional design choice on behalf of the authors of EpiTwitter. Catch the exception and interpret as “no, these credentials are not valid”.