Possible bug in users/show usage

3 views
Skip to first unread message

Filipe Giusti

unread,
Aug 12, 2009, 8:35:38 PM8/12/09
to twitter4r-users, ne...@oortle.com
Hello all,

I was happily using twitter4R to get the id's of some twitter users
then it suddenly stopped to work.
I noticed that the following code started to raises an RESTerror.

twitter_username = "fgiusti_oortle"
t = Twitter::Client.new
twitter_id = t.user(twitter_username).id

I give a try directly to the twitter API and it was working. So I
started to dig in the twitter4R code...

I put a cool debug after line 80 of base.rb file
puts "path #{path}"

And below you can see the output

>> require 'twitter'
=> ["Twitter"]
>> t = Twitter::Client.new
=>
>> t.user(43030791)
path /users/show?id=43030791
Twitter::RESTError: HTTP 404: Not Found at
from /usr/lib/ruby/gems/1.8/gems/twitter4r-0.3.1/lib/twitter/
client/base.rb:39:in `raise_rest_error'
from /usr/lib/ruby/gems/1.8/gems/twitter4r-0.3.1/lib/twitter/
client/base.rb:44:in `handle_rest_response'
from /usr/lib/ruby/gems/1.8/gems/twitter4r-0.3.1/lib/twitter/
client/base.rb:18:in `http_connect'
from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
from /usr/lib/ruby/gems/1.8/gems/twitter4r-0.3.1/lib/twitter/
client/base.rb:14:in `http_connect'
from /usr/lib/ruby/gems/1.8/gems/twitter4r-0.3.1/lib/twitter/
client/user.rb:37:in `user'
from (irb):3
>> t.user("fgiusti_oortle")
path /users/show?id=fgiusti_oortle
Twitter::RESTError: HTTP 404: Not Found at
from /usr/lib/ruby/gems/1.8/gems/twitter4r-0.3.1/lib/twitter/
client/base.rb:39:in `raise_rest_error'
from /usr/lib/ruby/gems/1.8/gems/twitter4r-0.3.1/lib/twitter/
client/base.rb:44:in `handle_rest_response'
from /usr/lib/ruby/gems/1.8/gems/twitter4r-0.3.1/lib/twitter/
client/base.rb:18:in `http_connect'
from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
from /usr/lib/ruby/gems/1.8/gems/twitter4r-0.3.1/lib/twitter/
client/base.rb:14:in `http_connect'
from /usr/lib/ruby/gems/1.8/gems/twitter4r-0.3.1/lib/twitter/
client/user.rb:37:in `user'
from (irb):4

The way twitter4R is using the users/show twitter API don't seems to
be correct (http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-users
%C2%A0show)

That's make any sense? Why it was working before than suddenly
stopped? Did twitter changed their API?

Thanks for your attention.

--
Filipe Vernetti Giusti

Susan Potter

unread,
Aug 12, 2009, 9:04:14 PM8/12/09
to twitter4r-users
Hi Filipe,

Yes, Twitter recently made a number of changes and I guess that was
one of them. I will review the current REST API docs and see what I
can do in terms of a 0.3.2 release.

Thanks for alerting me to this!
Susan

Susan Potter

unread,
Aug 12, 2009, 9:04:43 PM8/12/09
to twitter4r-users
Don't you just love it when there are no API versions and everything
changes from under you? Thanks Twitter! :)

On Aug 12, 7:35 pm, Filipe Giusti <filipegiu...@gmail.com> wrote:

Filipe Giusti

unread,
Aug 13, 2009, 3:47:12 PM8/13/09
to twitter4r-users
Is there someone that dislikes an improvement in the API? It just
breaks your code, nothing so serious.....
:)
I will give a try to fix at least this part of the code.

S Potter

unread,
Aug 15, 2009, 12:09:37 AM8/15/09
to twitter...@googlegroups.com
Thanks Filipe, you are a star. I see the GitHub request and will
attend to it over the weekend!
--
mailto:m...@susanpotter.net
blog:http://geek.susanpotter.net
blog:http://startup.susanpotter.net
linkedin:http://www.linkedin.com/in/susanpotter
Reply all
Reply to author
Forward
0 new messages