SlideShare una empresa de Scribd logo
1 de 21
Using the   flick r   API to please my wife Background images downloaded from:  http://profesorul09.webs.com/apps/photos/ My wife loves to take pictures, she also loves photo albums. Long time ago I wrote a little script for her that adds the original date to a photo using ImageMagick / This is the story of how to do the same in  flick r Note:   flick r   automatically   presents this info at the right side of any image – if it contains this EXIF info -, but I really want to try to do it by myself
Why Flickr? / Which language ,[object Object],[object Object]
PHP for a web app sounds good too
What does this app going to do?  ,[object Object]
How does it will look like?
This time I chose PHP ,[object Object]
Flowchart – kind of ,[object Object]
Once the user has logged into flickr is redirected to just4fun, when he/she can see a list of their albums.
The user click on any of their albums and gain access to the images inside of its selection.
The user click on any of the photos presented and just4fun add the date when the picture was taken as a comment and a tag inside flickr.
First Step: HTML Interface ,[object Object],<img style=&quot;height: 84px; width: 369px;&quot; alt=&quot;just4fun - a simple app using flickr API&quot;  src=&quot;http://flickr.nosv.org/out.php?s=just4fun&quot;  align=&quot;left&quot; hspace=&quot;3&quot; vspace=&quot;1&quot;> ,[object Object]
phpflickr – lets begin the magic! ,[object Object]
auth.php $api_key  = &quot; copy and paste your api key here &quot;; $api_secret  = &quot; copy and paste your api secret here &quot;; $default_redirect  = &quot;/&quot;; $permissions  = &quot;read&quot;; $path_to_phpFlickr_class = &quot;./&quot;; ,[object Object]
In flickr ... ,[object Object]
And the index.php ,[object Object],<?php require_once(&quot;./lib/phpFlickr.php&quot;); require_once(&quot;./constants.php&quot;); $f = new phpFlickr(&quot;api_key&quot;,&quot;secret&quot;); $f->auth('write'); … ,[object Object]
Get the albums ,[object Object]
Easy isn't?
And you can paint a list of albums with this couple of lines: foreach($albums['photoset'] as $album) echo &quot;<a href='&quot;.$_SERVER['PHP_SELF'].&quot; ?id_album =&quot;.$album['id'].&quot;'>&quot;.$album['title'].&quot;</a><br/>&quot;; ,[object Object]
For this album -> get the photos ,[object Object],if($_GET['id_album']) $pictures = $f->photosets_getPhotos($_GET['id_album']); ,[object Object],$i = 0; foreach($pictures['photoset']['photo'] as $photo){ echo &quot;<a href='&quot;.$_SERVER['PHP_SELF'].&quot;?id_photo=&quot;.$photo['id'].&quot;'><img src='&quot;.$f->buildPhotoURL($photo, &quot;Square&quot;).&quot;' border='0'></a>&quot;; if($i>=3){ //only needed if you want rows of 4 photos each echo &quot;<br/>&quot;; $i=0; } else $i++;
For this photo -> get the date and use it as a comment/tag ,[object Object]
Step 1: get the information for this photo: $photo_info = $f->photos_getInfo($_GET['id_photo']);

Más contenido relacionado

La actualidad más candente

Copycopter Presentation by Joe Ferris at BostonRB
Copycopter Presentation by Joe Ferris at BostonRBCopycopter Presentation by Joe Ferris at BostonRB
Copycopter Presentation by Joe Ferris at BostonRB
bostonrb
 

La actualidad más candente (20)

August 10th, 2009 Dave Ross Word Press
August 10th, 2009 Dave Ross Word PressAugust 10th, 2009 Dave Ross Word Press
August 10th, 2009 Dave Ross Word Press
 
Theming Volto
Theming VoltoTheming Volto
Theming Volto
 
Outside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and RspecOutside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and Rspec
 
Sympal - Symfony CMS Preview
Sympal - Symfony CMS PreviewSympal - Symfony CMS Preview
Sympal - Symfony CMS Preview
 
15.exemplu complet eloquent view add-edit-delete-search
15.exemplu complet eloquent view add-edit-delete-search15.exemplu complet eloquent view add-edit-delete-search
15.exemplu complet eloquent view add-edit-delete-search
 
Rails Antipatterns | Open Session with Chad Pytel
Rails Antipatterns | Open Session with Chad Pytel Rails Antipatterns | Open Session with Chad Pytel
Rails Antipatterns | Open Session with Chad Pytel
 
Cucumber Ru09 Web
Cucumber Ru09 WebCucumber Ru09 Web
Cucumber Ru09 Web
 
Simplifying Code: Monster to Elegant in 5 Steps
Simplifying Code: Monster to Elegant in 5 StepsSimplifying Code: Monster to Elegant in 5 Steps
Simplifying Code: Monster to Elegant in 5 Steps
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page Creation
 
You're Doing It Wrong
You're Doing It WrongYou're Doing It Wrong
You're Doing It Wrong
 
Advanced Views with Erector
Advanced Views with ErectorAdvanced Views with Erector
Advanced Views with Erector
 
Copycopter Presentation by Joe Ferris at BostonRB
Copycopter Presentation by Joe Ferris at BostonRBCopycopter Presentation by Joe Ferris at BostonRB
Copycopter Presentation by Joe Ferris at BostonRB
 
Build a Better Editing Experience with Advanced Custom Fields - #WCTO16
Build a Better Editing Experience with Advanced Custom Fields - #WCTO16Build a Better Editing Experience with Advanced Custom Fields - #WCTO16
Build a Better Editing Experience with Advanced Custom Fields - #WCTO16
 
Being Dangerous with Twig
Being Dangerous with TwigBeing Dangerous with Twig
Being Dangerous with Twig
 
Custom Post Type - Create and Display
Custom Post Type - Create and DisplayCustom Post Type - Create and Display
Custom Post Type - Create and Display
 
Develop advance joomla! MVC Component for version 3
Develop advance joomla! MVC Component for version 3Develop advance joomla! MVC Component for version 3
Develop advance joomla! MVC Component for version 3
 
Bowtie: Interactive Dashboards
Bowtie: Interactive DashboardsBowtie: Interactive Dashboards
Bowtie: Interactive Dashboards
 
jQuery Plugin
jQuery PluginjQuery Plugin
jQuery Plugin
 
PhpSpec extension points
PhpSpec extension pointsPhpSpec extension points
PhpSpec extension points
 
Reviews SEO Tools
Reviews  SEO ToolsReviews  SEO Tools
Reviews SEO Tools
 

Destacado

Destacado (6)

Why change kills engagement
Why change kills engagementWhy change kills engagement
Why change kills engagement
 
What is Agility in Pricing & What are the Implications for Your Billing System?
What is Agility in Pricing & What are the Implications for Your Billing System?What is Agility in Pricing & What are the Implications for Your Billing System?
What is Agility in Pricing & What are the Implications for Your Billing System?
 
5 Amazing Valentine's Day Stats
5 Amazing Valentine's Day Stats5 Amazing Valentine's Day Stats
5 Amazing Valentine's Day Stats
 
El índice de confianza del consumidor (ICC) cae levemente (-0,6%) en noviembre
El índice de confianza del consumidor (ICC) cae levemente (-0,6%) en noviembre El índice de confianza del consumidor (ICC) cae levemente (-0,6%) en noviembre
El índice de confianza del consumidor (ICC) cae levemente (-0,6%) en noviembre
 
Enjoy valentine's special shows with your beloved!
Enjoy valentine's special shows with your beloved!Enjoy valentine's special shows with your beloved!
Enjoy valentine's special shows with your beloved!
 
10 Mistakes People Make with Happiness (plus 1 bonus)
10 Mistakes People Make with Happiness (plus 1 bonus)10 Mistakes People Make with Happiness (plus 1 bonus)
10 Mistakes People Make with Happiness (plus 1 bonus)
 

Similar a My Story With Flickr

Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP
yucefmerhi
 
Services Apps Iand Flex Applications
Services Apps Iand Flex ApplicationsServices Apps Iand Flex Applications
Services Apps Iand Flex Applications
Sumit Kataria
 

Similar a My Story With Flickr (20)

Evolution of API With Blogging
Evolution of API With BloggingEvolution of API With Blogging
Evolution of API With Blogging
 
The Face Behind Facebook
The Face Behind FacebookThe Face Behind Facebook
The Face Behind Facebook
 
Writing webapps with Perl Dancer
Writing webapps with Perl DancerWriting webapps with Perl Dancer
Writing webapps with Perl Dancer
 
Facebook Developer Garage Cyberjaya
Facebook Developer Garage CyberjayaFacebook Developer Garage Cyberjaya
Facebook Developer Garage Cyberjaya
 
Starting to Monkey Around With Yahoo! Search Monkey
Starting to Monkey Around With Yahoo! Search MonkeyStarting to Monkey Around With Yahoo! Search Monkey
Starting to Monkey Around With Yahoo! Search Monkey
 
Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP
 
Shiny Agency's Facebook Development Guidelines
Shiny Agency's Facebook Development GuidelinesShiny Agency's Facebook Development Guidelines
Shiny Agency's Facebook Development Guidelines
 
Fast Loading JavaScript
Fast Loading JavaScriptFast Loading JavaScript
Fast Loading JavaScript
 
Services Apps Iand Flex Applications
Services Apps Iand Flex ApplicationsServices Apps Iand Flex Applications
Services Apps Iand Flex Applications
 
August 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle TwitterAugust 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle Twitter
 
FVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / WidgetsFVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / Widgets
 
Spyware/Malware FVCP
Spyware/Malware  FVCPSpyware/Malware  FVCP
Spyware/Malware FVCP
 
Lessons Learned - Building YDN
Lessons Learned - Building YDNLessons Learned - Building YDN
Lessons Learned - Building YDN
 
Facebook Platform - Tech
Facebook Platform - TechFacebook Platform - Tech
Facebook Platform - Tech
 
Facebook Connect Integration
Facebook Connect IntegrationFacebook Connect Integration
Facebook Connect Integration
 
Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919
 
Rich faces
Rich facesRich faces
Rich faces
 
Caret Introduction
Caret IntroductionCaret Introduction
Caret Introduction
 
Writing Pluggable Software
Writing Pluggable SoftwareWriting Pluggable Software
Writing Pluggable Software
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 

Más de Jose Martinez

Bienvenida a-la-segunda-parte-del-eje-3
Bienvenida a-la-segunda-parte-del-eje-3Bienvenida a-la-segunda-parte-del-eje-3
Bienvenida a-la-segunda-parte-del-eje-3
Jose Martinez
 
Hacia un aprendizaje más abierto: Prácticas y Recursos del siglo XXI
Hacia un aprendizaje más abierto: Prácticas y Recursos del siglo XXIHacia un aprendizaje más abierto: Prácticas y Recursos del siglo XXI
Hacia un aprendizaje más abierto: Prácticas y Recursos del siglo XXI
Jose Martinez
 
JAVA2: Segunda Lección
JAVA2: Segunda LecciónJAVA2: Segunda Lección
JAVA2: Segunda Lección
Jose Martinez
 

Más de Jose Martinez (9)

Bienvenida a-la-segunda-parte-del-eje-3
Bienvenida a-la-segunda-parte-del-eje-3Bienvenida a-la-segunda-parte-del-eje-3
Bienvenida a-la-segunda-parte-del-eje-3
 
Introducción a los StoryBoard
Introducción a los StoryBoardIntroducción a los StoryBoard
Introducción a los StoryBoard
 
Hacia un aprendizaje más abierto: Prácticas y Recursos del siglo XXI
Hacia un aprendizaje más abierto: Prácticas y Recursos del siglo XXIHacia un aprendizaje más abierto: Prácticas y Recursos del siglo XXI
Hacia un aprendizaje más abierto: Prácticas y Recursos del siglo XXI
 
Presentación Inicial Proyecto Grupo 13
Presentación Inicial Proyecto Grupo 13Presentación Inicial Proyecto Grupo 13
Presentación Inicial Proyecto Grupo 13
 
¿Por qué Relacional?
¿Por qué Relacional?¿Por qué Relacional?
¿Por qué Relacional?
 
#noquieroestaraca
#noquieroestaraca#noquieroestaraca
#noquieroestaraca
 
Hoy para mi: Educación es
Hoy para mi: Educación esHoy para mi: Educación es
Hoy para mi: Educación es
 
Introducción a Java Persistence API
Introducción a Java Persistence APIIntroducción a Java Persistence API
Introducción a Java Persistence API
 
JAVA2: Segunda Lección
JAVA2: Segunda LecciónJAVA2: Segunda Lección
JAVA2: Segunda Lección
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 

My Story With Flickr

  • 1. Using the flick r API to please my wife Background images downloaded from: http://profesorul09.webs.com/apps/photos/ My wife loves to take pictures, she also loves photo albums. Long time ago I wrote a little script for her that adds the original date to a photo using ImageMagick / This is the story of how to do the same in flick r Note: flick r automatically presents this info at the right side of any image – if it contains this EXIF info -, but I really want to try to do it by myself
  • 2.
  • 3. PHP for a web app sounds good too
  • 4.
  • 5. How does it will look like?
  • 6.
  • 7.
  • 8. Once the user has logged into flickr is redirected to just4fun, when he/she can see a list of their albums.
  • 9. The user click on any of their albums and gain access to the images inside of its selection.
  • 10. The user click on any of the photos presented and just4fun add the date when the picture was taken as a comment and a tag inside flickr.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 18.
  • 19.
  • 20.
  • 21. Step 1: get the information for this photo: $photo_info = $f->photos_getInfo($_GET['id_photo']);
  • 22.
  • 23. Verify if everything works as expected if($f->getErrorCode()) echo $f->getErrorMsg(); else echo &quot;<a href='&quot;.$photo_info['urls']['url'][0]['_content'].&quot;' target=_blank title='Click on the image to open it on flickr'><img src='&quot;.$f->buildPhotoURL($photo_info,&quot;Small&quot;).&quot;' border='0'></a><br/><em>Your image was sucessfully Commented/Tagged</em>&quot;;
  • 24. Original photo (real snapshot)
  • 27.
  • 28. And if you're interested you can download and take a look of the full code of this app here: http://www.easy-share.com/1905396148/just4fun.zip
  • 29. You can reach me via twitter: @lacucaramacara
  • 30. Thanks for your attention Jose Andres Martinez S. http://thewebdevelopers.biz @lacucaramacara