Coder Social home page Coder Social logo

Gem no longer works about flickraw HOT 14 CLOSED

hanklords avatar hanklords commented on July 30, 2024
Gem no longer works

from flickraw.

Comments (14)

hanklords avatar hanklords commented on July 30, 2024

Flickraw api key seem to have been banned. You need to apply for an api key with flickr yourself.

http://www.flickr.com/services/apps/create/apply/

from flickraw.

bananastalktome avatar bananastalktome commented on July 30, 2024

Be sure to create FlickRawOptions prior to the require 'flickraw' statement as described in the readme (I only use "api_key" and "timeout"):

FlickRawOptions = {
"api_key" => "... Your API key ...",
"shared_secret" => "... Your shared secret ...",
"auth_token" => "... Your saved token..." # if you set this you will be automatically loggued
"lazyload" => true, # This delay the loading of the library until the first call

# Proxy support. alternatively, you can use the http_proxy environment variable
"proxy_host" => "proxy_host",
"proxy_port" => "proxy_port",
"proxy_user" => "proxy_user",
"proxy_password" => "proxy_password",

"timeout" => 5,                # Set the request timeout
"auth_token" => "SAVED_TOKEN"  # Set the initial token

}
require 'flickraw'

I found this out the hard way... :)

from flickraw.

BrianTheCoder avatar BrianTheCoder commented on July 30, 2024

Looks like this can be fixed by setting FlickrawOptions variables before requiring. Not the best design IMHO

from flickraw.

hanklords avatar hanklords commented on July 30, 2024

I am considering making lazyload the default option. As an alternative you can use flickraw-cached.
Also I am trying to get back my key from flickr.

from flickraw.

robinbortlik avatar robinbortlik commented on July 30, 2024

I had the same problem, so I read the flickr documentations and see this.
http://www.flickr.com/services/api/flickr.reflection.getMethods.html

The flickr.reflection.getMethods require api_key, but at the method "call" in class Flickr, args are empty. So, you need to pass you api_key to this method.

from flickraw.

andruby avatar andruby commented on July 30, 2024

This is my dirty fix:

begin
  require 'flickraw'
rescue
  FlickRaw.api_key       = 'key'
  FlickRaw.shared_secret = 'secret'
  require 'flickraw'
end

from flickraw.

thebeardbe avatar thebeardbe commented on July 30, 2024

Another very dirty fix for rails3 beta

remove flickraw from your gemfile
and add

begin
  require 'flickraw'
rescue
  FlickRaw.api_key       = 'key'
  FlickRaw.shared_secret = 'secret'
end

to your config/boot.rb

it is a very dirty fix, but that's the only way I found to add your api-key before flickraw is loaded by GemFile

from flickraw.

boncey avatar boncey commented on July 30, 2024

I made a post about this on the Flickr API group.
http://www.flickr.com/groups/api/discuss/72157623996405390/

Anyway, my quick and dirty fix involved editing the flickraw.rb file and replacing the expired key with the working one from my app. :-)

from flickraw.

hanklords avatar hanklords commented on July 30, 2024

I pushed version 0.8.2 which should fix the problem.

from flickraw.

robinbortlik avatar robinbortlik commented on July 30, 2024

Thank's, now it works great.

from flickraw.

fidothe avatar fidothe commented on July 30, 2024

I'm still seeing the expired API error with 0.8.2...

from flickraw.

hanklords avatar hanklords commented on July 30, 2024

Do you initialize it with your own API key ?

You have 2 ways:

FlickRawOptions = {
  "api_key" => "... Your API key ...",
  "shared_secret" => "... Your shared secret ..."
}
require "filckraw"

or

require 'flickraw'

FlickRaw.api_key       = 'key'
FlickRaw.shared_secret = 'secret'

from flickraw.

harrylove avatar harrylove commented on July 30, 2024

@fidothe, do you have it installed as a plugin? If so, update your plugin or switch to the gem version. You also need your own valid API key defined somewhere.

from flickraw.

fidothe avatar fidothe commented on July 30, 2024

@hanklords, @harrylove - my bad, I misread and thought that 0.8.2 restored the gem-default API key... panic over...

from flickraw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.