Problem/Motivation
Add support for the Flickr API so that the user can enter a Flickr image's url or photo ID to create a new Flickr media entity.
Creating a Flickr media entity currently needs the user to copy the Flickr image's embed code, and paste that into the new entity. This requires extra explanation to the user, and extra clicks for them to reach the embed code:
<a data-flickr-embed="true" href="https://www.flickr.com/photos/hoting2000/42633796482/" title="c. 1927 Over Kaitak airport"><img src="https://live.staticflickr.com/1735/42633796482_96ea80492a_o.jpg" width="1245" height="770" alt="c. 1927 Over Kaitak airport"></a><script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
It's easier if the user can just paste in the url from the web browser, eg
https://www.flickr.com/photos/hoting2000/42633796482/
Or even just the photo ID, eg
42633796482
But then we'll need to use the Flickr API to get additional information about the image, such as the title, or the path to the image file.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3216880-3-Flickr.php_.txt | 13.54 KB | davidhk |
| #2 | 3216880-2-Flickr.php_.txt | 13.44 KB | davidhk |
Comments
Comment #2
davidhk commentedI've attached an edited copy of Flickr.php that adds support for the Flickr API, allowing users to create new Flickr media entities by typing in the url or photo ID. The embed code is still supported too.
To make it work you need to edit the line:
private static $flickr_api_key = '';And paste in your Flickr API key to the string. You can apply for a free API key at: https://www.flickr.com/services/api/misc.api_keys.html
Comment #3
davidhk commentedSmall update to fix a problem with caching that showed up during a migration.