Skip Menu |

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

Report information
The Basics
Id: 46725
Status: new
Priority: 0/
Queue: Twitter-Badge

People
Owner: Nobody in particular
Requestors: jim [...] rippon.me.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.02
Fixed in: (no value)



Subject: ID Retrieval failing in sub get_id_from_screen_name
The function "get_id_from_screen_name" is failing, and this seems to be because the html match on line 34 of Badge.pm is broken in the current Twitter response for my Twitter account. I propose the attached patch, which uses the Twitter API functionality to get the user ID with XML - this could probably be done in a neater way using json, but I am not a perl developer... Jim
Subject: Badge.pm-0.02.patch
31c31 < my $response = $ua->get('http://twitter.com/'.$self->{screen_name}); --- > my $response = $ua->get('http://twitter.com/users/show.xml?screen_name='.$self->{screen_name}); 34c34 < if ($html =~ m!<link rel="alternate".+?href="http://twitter.com/statuses/user_timeline/(\d+)\.rss" />!){ --- > if ($html =~ m!<id>(\d+)</id>!){