sybrenstuvel / flickrapi

Python Flickr API implementation
https://stuvel.eu/flickrapi
Other
155 stars 33 forks source link

Django Authentication Method "flickr.web.login.url" not found #82

Open greenpasta opened 7 years ago

greenpasta commented 7 years ago

I want to write tags to photos and I get a 400 error when I try to based on the following code:

flickr = flickrapi.FlickrAPI(flickr_api_key, flickr_secret_key, format='parsed-json')
flickr.photos.addtags(photo_id='12345', tags='newtag')

I'm guessing I have to do some additional authentication in order to use write methods? If so I tried the Django example from your documentation and the following line:

url = f.web_login_url(perms='read')

Gives this error:

flickrapi.exceptions.FlickrError: Error: 112: Method "flickr.web.login.url" not found

Background/questions:

I'm running an unattended script against Flickr - will I have to manually interact to get a token each time or is there some way I can generate a token once then save it for all future requests? I am able to manually walk through the 'oob' process in a python shell using get_access_token.

sybrenstuvel commented 7 years ago

I'll have to update the documentation (pull requests are welcome). The correct function to call is auth_url(perms).

sybrenstuvel commented 7 years ago

The Django example needs more changes, to update it so that it works again. It's been a while since I looked at it ;-)

unicornlox commented 7 years ago

Hello Dear Sybrenstuvel ; Could you describe how to use FlickApi on django, I need support especially in authentication? I think the existing documents and descriptions belong to the old versions. I make mistakes when I do it with existing narrations. Thank you in advance for your help.

sybrenstuvel commented 7 years ago

I'll see if I can update the documentation. If in the mean time you have your own ideas for improvements and fixes, post them here.

unicornlox commented 7 years ago

Dear Sybrenstuvel, thank you very much for your feedback.