Forum: Ruby on Rails Flickr API integration problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
srinu (Guest)
on 2009-03-09 15:30
(Received via mailing list)
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:in `call_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:in `load_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:in `new'
        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.
This topic is locked and can not be replied to.