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 = ‘XXXXXXXXXXXXXXXXXXXXX’
FLICKR_SECRET = ‘XXXXXXXXX’
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 frob (108)
/usr/local/lib/ruby/1.8/xmlrpc/client.rb:414:in call': Invalid frob (XMLRPC::FaultException) from /usr/local/lib/ruby/gems/1.8/gems/rflickr-2006.02.01/lib/flickr/ base.rb:153:incall_unauth_method’
from /usr/local/lib/ruby/gems/1.8/gems/rflickr-2006.02.01/lib/flickr/
auth.rb:52:in `getToken’
from flickr2.rb:27
Any help will be appreciated.