I also use epiTwitter. Using 'localhost' has worked for me, but sometimes it breaks, and I now prefer 127.0.0.1.
As you note: after successful authentication with Twitter, it works fine for the first time until page refresh. This means the oauth tokens are not saved into session variables, a database, or cookies for next use, such as on a page refresh. You need to save the tokens for future access. ~Patrick On Sat, Apr 24, 2010 at 11:20 AM, KPL <kapil.sa...@gmail.com> wrote: > From past few days, I am trying to get the EpiTwitter library work for > me. But, it is behaving in unusually. > > I am on Fedora 12 with PHP 5.3.2. It's my development box. > > Here are the issues I am facing. > > 1.When I made a simple script with the method *getAuthenticateUrl* and > accessed it from http://localhost/ , it wasn't working and threw > errors(below) . But when I accidently tried http://127.0.01./ it > worked. > > Fatal error: Uncaught exception 'EpiOAuthException' in /var/www/html/ > twitter/classes/EpiOAuth.php:397 > Stack trace: > #0 /var/www/html/twitter/classes/EpiOAuth.php(367): > EpiOAuthException::raise(Object(EpiCurlManager), false) > #1 > /var/www/html/twitter/classes/EpiOAuth.php(39): EpiOAuthResponse- >>__get('oauth_token') > #2 /var/www/html/twitter/preview.php(34): EpiOAuth- >>getAuthenticateUrl(NULL, Array) > #3 {main} > thrown in /var/www/html/twitter/classes/EpiOAuth.php on line 397 > > > 2.After successful authentication, when returned to my script, it > works fine for the first time,when it is actually redirected by > Twitter.But when I refresh the page, it throws the following error - > > > Fatal error: Uncaught exception 'EpiOAuthUnauthorizedException' in / > var/www/html/twitter/classes/EpiOAuth.php:395 > Stack trace: > #0 /var/www/html/twitter/classes/EpiOAuth.php(367): > EpiOAuthException::raise(Object(EpiCurlManager), false) > #1 /var/www/html/twitter/preview.php(48): EpiOAuthResponse- >>__get('oauth_token') > #2 {main} > thrown in /var/www/html/twitter/classes/EpiOAuth.php on line 395 > > Should this be problem with my server or cURL installation? When I > checked phpinfo(), cURL was enabled, but when I had a look in > Configure Command section, I saw this > > '--without-curl' > > Is there any relation of this with the errors? > > Also, I was unable to access the responseText and the try-catch > combination with $e->getMessage(); didn't yeild any results. > > Thanks in advance for your help. > > Regards, > Kapeel S > > > > > -- > Subscription settings: > http://groups.google.com/group/twitter-development-talk/subscribe?hl=en >