![]() # I stick mine in memcache with their session key as the cache = flickr.get_authorize_url(token, perms: "delete") Token = flickr.get_request_token(oauth_callback: You'll need to store the token somewhere for when the user is returned to the callback method ![]() # This is the URL Flickr will redirect your users to once they agree to = " # Users should hit this method to get the link which sends them to flickrįlickr = Flickr.new API_KEY, SHARED_SECRET However, that particular error persists.Įdit to add the initializers/flickr.rb file: require "dotenv/load"įlickr_shared_secret = ENVįlickr = Flickr.new flickr_api_key, flickr_shared_secret I have verified with p (not puts) that it does get output as a string. to_str on it before passing it to the method. So, I tried saving it to a variable and explicitly calling. However, I still get the "no implicit conversion of symbol to string" error. can anyone point out where I'm going wrong? Thank you.Įdit: I've been able to verify that I can puts the user_id and the correct nsid is output to the rails server. I have tried a few other things as well, but the result is always one of those error messages. Undefined method `delete' for nil:NilClass No implicit conversion of Symbol into String So, I figure that I need pull the nsid out of the hash and pass it to my api call. I don't quite understand the no method error for delete, but I gather that it is coming from the flickr gem. (around line #8): 6 7 8 9 10 11 if params.present?Įlsif = tags: params, safesearch: 1Īs you can see, I'm getting a response with the nsid in it. ![]() Here is the controller: class StaticPagesController Extracted source ![]() There is only the index controller action and a very basic form partial and another partial to render the returned photos. It's a very basic app with no model and no database. Here's the current version of the app before I branched it to attempt this. It's easy to find peoples usernames on the flickr website, but hard to find ID's so I think this will be more user friendly. It was working by user_id, but I am trying to change it to accept username, and then use the method to get the user id and then use that to pull up the photos. It is working for recent photos, which are displayed if nothing is entered in the form yet. I am working on a small app to access the flickr api and serve up photos. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |