Flickr Open Api Mashup

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Flickr Open Api Mashup - Presentation Transcript

    1. flickr Open API & Mash-up 2008. 05. 26 Yahoo! Korea , Jinho Jung
    2. !\" • flickr #$ • API Key & NSID • DEMO – NSID% &'( )* +, – Photo ID- )* ./ 0123 – )'4 ./ 0123 • Flickr API Explorer • Flickr Feeds & Format • DEMO – HTML Badge 563 • 78 & API Signature
    3. 9: ;< • flickr =>?? • flickr &' @ /AB?? • Open API =>?? • Open API CD EF ?
    4. About flickr • GH7 )* IJ K LM – )* N-O – )*IJ moo.com flickr – &P,LM – QR • ST( 563 – Open API % &' – 7U, )*V – WH&OX DVD, YZ
    5. flickr [\\ • Flickr [\\ – ]^ 12,000 $ &_Q `ab (2.6TB) – cc 2005de &_Q N-O – fgh ! \"#$ &_Q • \\. : Free vs. Pro – Free ! Space : 200M / month ! Set : 3$ – Pro ! Unlimited ! Gift!
    6. )*IJ • Set – i. jC kle )* mn – op&q rstu, ‘v] wxu • Collection – Set(yz S{ Collection)e mn – 0|, }R(2007, 2006) • )*IJ – Collection K >~% 5Oz • – c€ •‚ ƒ„, …( †E yz ‡9 ˆV
    7. flickr )* IJ R‰
    8. Š~, &P • Š~ K ‹Œ – Š~ - )* •Ž •• ‘z ’‡Q – ‹Œ - &_Q =“Ž p3z Œ • &P – ”‰, 0| – '&P )*' •&Q
    9. N-O • Flickr Uploadr (PC, Mac) • iPhoto, Aperture • Windows XP plugin • Upload Page • Email
    10. DEMO : hp.com
    11. MashUp– •( 3— • HTML, CSS, XML & XPath • JS & DOM , AJAX , JSON, • Web Server & HTTP , Database • PHP , Perl, Regular Expression • REST, SOAP, XML-RPC, Curl
    12. Flickr Open API • activity • photos.notes • auth • photos.transform • blogs • photos.upload • contacts • photosets • favorites • photosets.comments • groups • prefs • interestingness • reflection • people • tags • photos • photos.geo • test • photos.licenses • urls
    13. NSID & API Key • NSID – Network Service ID – ˜M( User =&™ š – EX) 81559972@N00 ( = phploveme) – ›œ•ž †E 0Ÿ, NSIDz †E 0Ÿ • API Key – ¡&¢ ?£ ‡ )'¤z ID – ¥N' , a¥N'($¦') – API Key §£ ! http://www.flickr.com/services/api/keys/
    14. API Key §£
    15. API Key §£
    16. API )' ¨© • Charter Encoding : UTF-8 • Request Format – REST, SOAP, XML-RPC • REST API Endpoint – http://api.flickr.com/services/rest/ • API key ª Method % &'
    17. [ DEMO ] NSID% \"&' () *+
    18. DEMO : NSID% &'( )* +, • flickr.photos.search – Endpoint : http://api.flickr.com/services/rest/ – method : flickr.photos.search – user_id : 81559972@N00 ( phploveme NSID) – per_page : 5 ! Default : 100 , MAX: 500 – api_key : MY_API_KEY • Request URL – http://api.flickr.com/services/rest/? method=flickr.photos.search&user_id=81559972@N00 &per_page=5&api_key=25f136aee2f23291097789fb5d c13931
    19. DEMO : NSID% &'( )* +, • Result <?xml version=\"1.0\" encoding=\"utf-8\" ?> - <rsp stat=\"ok\"> - <photos page=\"1\" pages=\"236\" perpage=\"5\" total=\"1180\"> <photo id=\"565367310\" owner=\"81559972@N00\" secret=\"59ddfb1d5f\" server=\"1037\" farm=\"2\" title=\"˜« ¬-\" ispublic=\"1\" isfriend=\"0\" isfamily=\"0\" /> <photo id=\"565759301\" owner=\"81559972@N00\" secret=\"8ae60ad3a4\" server=\"1104\" farm=\"2\" title=\"®¯) R°±\" ispublic=\"1\" isfriend=\"0\" isfamily=\"0\" /> <photo id=\"565367234\" owner=\"81559972@N00\" secret=\"b749f597d5\" server=\"1161\" farm=\"2\" title=\";²³ :´\" ispublic=\"1\" isfriend=\"0\" isfamily=\"0\" /> <photo id=\"565759217\" owner=\"81559972@N00\" secret=\"9030c43e55\" server=\"1410\" farm=\"2\" title=\"£/J\" ispublic=\"1\" isfriend=\"0\" isfamily=\"0\" /> <photo id=\"565759175\" owner=\"81559972@N00\" secret=\"273f96008d\" server=\"1424\" farm=\"2\" title=\"Cj _-Lµ\" ispublic=\"1\" isfriend=\"0\" isfamily=\"0\" /> </photos> </rsp>
    20. DEMO : NSID% &'( )* +, • rsp : ¶· ¸¹ – stat=\"ok\" • photos : +, ¸¹ ?º – page=\"1\" »¼ •&Q – pages=\"236\" ½Q¾ •&Q – perpage=\"5\" •&Q^ &_Q ¿ – total=\"1180\" +,À &_Q • photo : +,¸¹ )* – id=\"565367310\" ˜M( Photo ID – owner=\"81559972@N00\" ÁÂ4 NSID – secret=\"59ddfb1d5f\" Image Server URL ‰-' – server=\"1037\" Image Server URL ‰-' – farm=\"2\" Image Server URL ‰-' – title=\"˜« ¬-\" CÃ
    21. [ DEMO ] Photo ID, () -. /012
    22. DEMO : Photo ID- )* ./ 0123 • flickr.photos.getInfo – Endpoint : http://api.flickr.com/services/rest/ – method : flickr.photos.getInfo – photo_id : 445533638 – api_key : MY_API_KEY • Photo URL – http://www.flickr.com/photos/phploveme/445533638/ • Request URL – http://api.flickr.com/services/rest/? api_key=25f136aee2f23291097789fb5dc13931&method=flickr.ph otos.getInfo&photo_id=445533638
    23. DEMO : Photo ID- )* ./ 0123 • Result <?xml version=\"1.0\" encoding=\"utf-8\" ?> - <rsp stat=\"ok\"> - <photo id=\"445533638\" secret=\"b7ce85e4c8\" server=\"224\" farm=\"1\" dateuploaded=\"1175649087\" isfavorite=\"0\" license=\"0\" rotation=\"0\" originalsecret=\"61c37df859\" originalformat=\"jpg\"> <owner nsid=\"81559972@N00\" username=\"phploveme\" realname=\"Jinho Jung\" location=\"South Korea\" /> <title>aG Ä ŽÅÆO ÇE</title> <description /> <visibility ispublic=\"1\" isfriend=\"0\" isfamily=\"0\" /> <dates posted=\"1175649087\" taken=\"2004-02-21 19:33:07\" takengranularity=\"0\" lastupdate=\"1182170636\" /> <editability cancomment=\"0\" canaddmeta=\"0\" /> <comments>9</comments> <notes /> - <tags> <tag id=\"1281997-445533638-187219\" author=\"81559972@N00\" raw=\"everland\" machine_tag=\"0\">everland</tag> <tag id=\"1281997-445533638-1213\" author=\"81559972@N00\" raw=\"night\" machine_tag=\"0\">night</tag> <tag id=\"1281997-445533638-373261\" author=\"81559972@N00\" raw=\"ŽÅÆO\" machine_tag=\"0\">ŽÅÆO</tag> </tags> - <urls> <url type=\"photopage\">http://www.flickr.com/photos/phploveme/445533638/</url> </urls> </photo> </rsp>
    24. DEMO : Photo ID- )* ./ 0123 • Photo – username=\"phploveme\" – realname=\"Jinho Jung\" – location=\"South Korea\" – title : aG Ä ŽÅÆO ÇE – dates ! posted=\"1175649087\" ÁÂc UNIX Timestamp ! taken=\"2004-02-21 19:33:07\" ÈÉc – Comments : 9 • Urls – http://www.flickr.com/photos/phploveme/445533638/
    25. [ DEMO ] NSID% \"&' (&3 -. 42
    26. DEMO : )'4 ./ 0123 • flickr.people.getInfo – Endpoint : http://api.flickr.com/services/rest/ – method : flickr.people.getInfo – user_id : 81559972@N00 (phploveme) – api_key : MY_API_KEY • Request URL – http://api.flickr.com/services/rest/? api_key=25f136aee2f23291097789fb5dc13931&metho d=flickr.people.getInfo&user_id=81559972@N00
    27. DEMO : )'4 ./ 0123 • Result <?xml version=\"1.0\" encoding=\"utf-8\" ?> - <rsp stat=\"ok\"> - <person id=\"81559972@N00\" nsid=\"81559972@N00\" isadmin=\"0\" ispro=\"1\" iconserver=\"184\" iconfarm=\"1\"> <username>phploveme</username> <realname>Jinho Jung</realname> <mbox_sha1sum>7fe046668354e5f10a223088c8d24708634e6815 </mbox_sha1sum> <location>South Korea</location> <photosurl>http://www.flickr.com/photos/phploveme/</photosurl> <profileurl>http://www.flickr.com/people/phploveme/</profileurl> <mobileurl>http://m.flickr.com/photostream.gne?id=1281997</mobileurl> - <photos> <firstdatetaken>2003-10-01 22:31:02</firstdatetaken> <firstdate>1175649047</firstdate> <count>1153</count> </photos> </person> </rsp>
    28. 567 : Flickr API Explorer • API test % •( ÊY ˆJ( R‰ – Ê$ †¿ – ¶· ËC – URL Ì- • API <` Cc ¤:Ž •Í – http://www.flickr.com/services/api/ flickr.people.getInfo.htm
    29. Flickr API Explorer
    30. Î¹Ï API &' • Ðc( ’#Oz (Ñ5 ÒÓ • ’#O ÒÓÔ‡Ô0Ÿ¤Õ Öž ./% 01× • Ø?( ¡&¢% ?£¤Q Ùn • ¡&¢ ÚÛ
    31. Flickr Feeds • )' 0Ÿ( ÜO ÃÂ – http://www.flickr.com/services/feeds/ • ÝÞŽ N-O À mß )*: – http://api.flickr.com/services/feeds/photos_public.gne • i. )'4e L$À )*: – http://api.flickr.com/services/feeds/photos_public.gne? id=USER-NSID • ‚à )* mn – http://api.flickr.com/services/feeds/groups_pool.gne? id=GROUP-NSID
    32. Feeds Format • rss2 : RSS 2.0 • atom : Atom 1.0 • rss_091 : RSS 0.91 • rss_092 , rss : RSS 0.92 • rss_100 , rdf : RSS 1.0 • rss_200_enc : RSS 2.0 with enclosures • 3á – php, php_serial, – csv, json, sql, yaml, cdf
    33. [ DEMO ] HTML Badge 892
    34. DEMO : HTML Badge 563 • http://www.flickr.com/badge.gne • âã ä* HTML Badge Flickr HTML Badge New HTML Badge
    35. DEMO : HTML Badge 563 • php feeds &' • $feed : ¸¹še PHP Code Block • http://api.flickr.com/services/feeds/ photos_public.gne? id=81559972@N00&format=php <?php • ¸¹ $feed = array( 'title'=> \"phplovemeåe )*\", 'url' => http://www.flickr.com/photos/phploveme/\", 'description' => \"\", 'pub_date' => \"1182188262\", …
    36. Index.html • <html> • <head> • <title>Flickr Mashups: New Badge </title> • <link href=\"../css/main.css\" rel=\"stylesheet\" type=\"text/ css\" /> • <link href=\"../css/badge.css\" rel=\"stylesheet\" type=\"text/css\" /> • </head> • <body> • <?php include('./badge.php') ?> • </body> • </html>
    37. badge.php : $feed • include(\"http://api.flickr.com/services/feeds/photos_public.gne? id=81559972@N00&format=php\"); • … • $str .= '<p class=\"badge-title\"> <a href=\"' . $feed['url'] . '\">' .$feed['title'] . '</a></p>'; • $items = $feed['items']; • for ($i = 0; $i < count($items); $i++) • { • if (preg_match('/(http:\\/\\/farm[0-9].static.flickr.com\\/\\d+\\/\\d+_[0-9a-z]+)_m \\.jpg/',$items[$i]['description'],$result)) • { • $image = $result[1] . '_s.jpg'; • $str .= '<li class=\"badge-item\"><a href=\"'.$items[$i]['url'].'\"> • <img src=\"'.$image.'\" alt=\"'.$items[$i]['title'].'\" /></a></li>'; • } • } • … • echo($str);
    38. Flickr Image Size • http://flickr.com/photo_zoom.gne?id=565367020&size=sq •_) ; æ s3 sq )çè 75 x 75 t éœc êë 100 s Dž s3 êë 240 m k9 s3 êë 500 o µì &_Q µì
    39. 78 : Authentication • 78 – aL$- ;.À )* – N-O N-O,¿., íC • aL$ )* – http://flickr.com/photos/phploveme/560185670/
    40. 78 : Authentication • Mashup 78 je)î – Mashup Ž`z ID/PW % ïQ ½H! – ðJñ )&~Ž`5 ID/PW -‚7 – Mashup ž …(5 òw ózS – )'4z …( ¿ô– Q./íC
    41. Mashup 78 User User 1. Redirect 2. Log in 3. Authentication : X Read, Write, Delete 4. Permission 3rd Party Mashup
    42. 78 : Mashup Ž …( òw¤3 • MashupŽ 78& Ø?( EY =“ URL- Redirect ‡õS – http://flickr.com/services/auth/?api_key=API- KEY&perms=PERMS&api_sig=API-SIG • Ê$ †¿ – api_key : 78ö – perms : read , write , delete – api_sig : ’#O ÒÓ' `æ(signature)
    43. API Signature 563 • API ö 78 ;.
    44. API Signature 563 • api_sig ö Ì- ¨© – md5(secret+api_key+api_val+perms+ perms_val) • ËC – Secret : 1d0c5d654af2d1e9 – api_key : 25f136aee2f23291097789fb5dc13931 – perms: read – api_sig =md5(1d0c5d654af2d1e9api_key25f136aee2f23291 097789fb5dc13931permsread) = 01b108f97ffaa4882ee2a93ab90ffff4
    45. Mashup 78 • 78 URL – http://flickr.com/services/auth/? api_key=25f136aee2f23291097789fb5dc13931&perms=rea d&api_sig=01b108f97ffaa4882ee2a93ab90ffff4 CallBack URL
    46. Mashup 78 ¥• • )'k7 ÷ò Mashup …( – http://www.flickr.com/services/auth/list.gne
    47. [ DEMO ] Flickr Badge Wizard http://lovesera.com/tt/253
    48. [ DEMO ] FD's flickr Toys Badge Maker
    49. URLs • Flickr Services API <` – http://www.flickr.com/services/api/ • Flickr API ‚à – http://www.flickr.com/groups/api/ • Flickr API Korea – http://www.flickr.com/groups/apikr/ • Mashup Camp :; – http://lovesera.com/tt/253 • FD’s flickr Toys – http://bighugelabs.com/flickr/
    50. Thanks BLOG : lovesera.com flickr

    + Jinho JungJinho Jung, 2 years ago

    custom

    1282 views, 1 favs, 1 embeds more stats

    Flickr Open Api Mashup

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1282
      • 1277 on SlideShare
      • 5 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 15
    Most viewed embeds
    • 5 views on http://griumplus.blogspot.com

    more

    All embeds
    • 5 views on http://griumplus.blogspot.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories