Closed jacoby closed 9 years ago
Add the following code just before the update
call. Maybe dumping the full response will shed some light on it.
$nt->ua->add_handler(request_done => sub {
my $response = shift;
print $response->as_string;
return $response;
});
Twitter requires an SSL connection, so it might be something in the SSL handling that's different between the machines. Make sure you have current versions of IO::Socket::HTTPS
and Net::SSL
.
Technically, those should be optional dependencies for Net::Twitter since it can be used with Twitter compatible services that don't require SSL. But it looks like I may have inadvertently dropped the dependency when I switched to Distzilla for packaging.
You mention the system is in a different time zone. Be sure the system clock is accurate. OAuth relies on a reasonably accurate timestamps. You're don't seem to be getting far enough here for that to be the issue, though.
If, instead, you mean IO::Socket::SSL, just installed them and got 'em working.
Thank you.
Indeed, I did. The alphabet soup of HTTPS/SSL modules keeps me confused.
I have code that I want to use all the time that uses Net::Twitter, but it has been giving me the above error on my Linux box. I adapted the code from the POD:
When I run it on another machine, I get successful tweets. When I run it on the machine I'm behind 8 hours a day, I get:
jacoby@oz:~$ dev/t_test.pl 500 Can't connect to api.twitter.com:443 at dev/t_test.pl line 22jacoby@oz:~$
Where line 22 is the one with
$nt->update()
in it.It keeps happening to me. I installed perlbrew to get around it, and it worked for a while, then didn't. The error doesn't give me enough information to figure it out myself. Help?