[twitter-dev] Re: Strange problems with Twitter API

2010-04-24 Thread KPL
Patrick, thank you very much for your help.
You rock !
:-)


On Apr 24, 10:41 am, Patrick Kennedy kenned...@gmail.com wrote:
 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 fromhttp://localhost/, it wasn't working and threw
  errors(below) . But when I accidently triedhttp://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


[twitter-dev] update_profile_*_image methods problem

2010-04-24 Thread KPL
People,
I have been struggling over the two methods -

Update Profile Image and Update Background Image

I am using EpiTwitter library.

I am uploading GIFs, Twitter returns the expected result for
update_profile_background_image but returns 401 for
update_profile_image
, but the image is not changed.

Here are the headers catched from $apiObj-headers in my case while
using the

update_profile_background_image

Array
(
[Date] = Sat, 24 Apr 2010 17:51:36 GMT
[Server] = hi
[Status] = 200 OK
[X-Transaction] = 1272131495-55190-23911
[ETag] = b6a421c01936f3547802ae6b59ee7ef3
[Last-Modified] = Sat, 24 Apr 2010 17:51:36 GMT
[X-Runtime] = 0.13990
[Content-Type] = application/json; charset=utf-8
[Content-Length] = 1272
[Pragma] = no-cache
[X-Revision] = DEV
[Expires] = Tue, 31 Mar 1981 05:00:00 GMT
[Cache-Control] = no-cache, no-store, must-revalidate, pre-
check=0, post-check=0
[Set-Cookie] = REMOVED
[Vary] = Accept-Encoding
[Connection] = close
)

and for update_profile_image -

Array
(
[Date] =gt; Sat, 24 Apr 2010 17:57:58 GMT
[Server] =gt; hi
[Status] =gt; 401 Unauthorized
[WWW-Authenticate] =gt; Basic realm=Twitter API
[X-Runtime] =gt; 0.02263
[Content-Type] =gt; text/html; charset=utf-8
[Content-Length] =gt; 152
[Cache-Control] =gt; no-cache, max-age=300
[Set-Cookie] =gt; REMOVED
[Expires] =gt; Sat, 24 Apr 2010 18:02:58 GMT
[Vary] =gt; Accept-Encoding
[Connection] =gt; close
)

Can somebody help me out?



-- 
Subscription settings: 
http://groups.google.com/group/twitter-development-talk/subscribe?hl=en


[twitter-dev] Strange problems with Twitter API

2010-04-23 Thread KPL
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


[twitter-dev] Generating oauth_signature?

2010-03-21 Thread KPL
Hello guys,

I want to know if there's any function in PHP with which one can
generate oauth_signature directly without using a library?

I have tried to use JMathai's  and Abraham's libraries for this
purpose, but failed to do so.

Help will be really appreciated.

Regards,
Kapeel S

To unsubscribe from this group, send email to 
twitter-development-talk+unsubscribegooglegroups.com or reply to this email 
with the words REMOVE ME as the subject.