Flickr API integration problem

I have gone through the rflickr README, and it says to get the token.
I have struck-up here with getting auth.token.

My script looks:

require ‘flickr’
FLICKR_KEY = ‘XXXXXXXXXXXXXXXXXX’
FLICKR_SECRET = ‘XXXXXX’
FLICKR_CACHE = “#{RAILS_ROOT}/config/flickr.cache”

flickr = Flickr.new(FLICKR_CACHE, FLICKR_KEY, FLICKR_SECRET)

unless flickr.auth.token
frob = flickr.auth.getFrob
puts “#{frob}”
link = flickr.auth.login_link
puts
puts link
puts
puts “copy and paste the above url into your browser then hit enter
after viewing the page”
gets
flickr.auth.getToken(frob)
flickr.auth.cache_token
end

My code is breaking …

ERR: Invalid auth token (98)
/usr/lib/ruby/1.8/xmlrpc/client.rb:414:in call': Invalid auth token (XMLRPC::FaultException) from /usr/lib/ruby/gems/1.8/gems/rflickr-2006.02.01/lib/ flickr/ base.rb:153:incall_unauth_method’
from /usr/lib/ruby/gems/1.8/gems/rflickr-2006.02.01/lib/
flickr/
auth.rb:72:in checkToken' from /usr/lib/ruby/gems/1.8/gems/rflickr-2006.02.01/lib/ flickr/ auth.rb:47:inload_token’
from /usr/lib/ruby/gems/1.8/gems/rflickr-2006.02.01/lib/
flickr/
auth.rb:19:in initialize' from /usr/lib/ruby/gems/1.8/gems/rflickr-2006.02.01/lib/ flickr/ base.rb:124:innew’
from /usr/lib/ruby/gems/1.8/gems/flickers-2006.02.01/lib/
flickr/base.rb:124:in `auth’
from script/authorize_flickr.rb:20

Any help will be appreciated.