Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-Twitter CPAN distribution.

Report information
The Basics
Id: 40835
Status: resolved
Priority: 0/
Queue: Net-Twitter

People
Owner: cthom [...] cpan.org
Requestors: perl [...] teknatus.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.17
Fixed in: (no value)



Subject: relationship_exists is broken
relationship_exists is broken and doesn't work. Provide two twitter ids and you find the URL is constructed incorrectly and the wrong URL is submitted. I've included a patch file fixing it.
Subject: Twitter.pm.patch
--- /Library/Perl/5.8.8/Net/Twitter.pm 2008-08-13 05:24:20.000000000 +0530 +++ /Users/pankaj/Twitter.pm 2008-11-11 22:02:36.000000000 +0530 @@ -408,13 +408,18 @@ my $url = $self->{apiurl} . "/friendships/exists.json"; $url .= "?user_a=$user_a"; - $url .= "?user_b=$user_b"; + $url .= "&user_b=$user_b"; - my $req = $self->{ua}->get( $self->{apiurl} . "/friendships/exists.json" ); + my $req = $self->{ua}->get( $url ); $self->{response_code} = $req->code; $self->{response_message} = $req->message; - return ( $req->is_success ) ? JSON::Any->jsonToObj( $req->content ) : undef; - + if ($req->content eq '"true"') { + return 1; + } elsif ($req->content eq '"false"') { + return 0; + } else { + return undef; + } } ########################################################################
This has been finally fixed in 1.21, which was just released to CPAN.