SlideShare a Scribd company logo
1 of 80
Download to read offline
Hacking Yahoo! Social



                      Saurabh Sahni
            Developer, Hacker, Evangelist


       ` 
Yahoo! Audience is the Platform
Two ways to hack Yahoo! Social

1)  Open Applications                            2) Social APIs

                                    HOME PAGE 


                            MY YAHOO! 

                                                   SOCIAL DIRECTORY    UPDATES 
                            Y! TOOLBAR 


                                      PULSE 


                     …more coming soon 
                                                   CONTACTS            STATUS 


Run your applications across Yahoo!              Syndicate UGC
Reach large Yahoo! audience                      Get referral traffic back to
                                                 your site
Open Applications

                                   HOME PAGE 



                          MY YAHOO! 



                           Y! TOOLBAR 

                                    PULSE 



                    …more coming soon 
Why hack open apps?
EASY TO BUILD 
‐ Quickly prototype idea within 24 hours        ENGAGING 
                                                ‐ Permanently parked in high‐traffic starBng points 
‐ Launch directly in producBon. No blockers!    ‐ Viral in nature 



                                                DISTRIBUTABLE 
                                                ‐ Discovery 
                                                ‐ PromoBon 
                                                ‐ Media buy enhanced 



                                                SOCIAL 
                                                ‐ Access user Profile & ConnecBon data 
                                                ‐ InteracBve, personalized 




                          MY APP 
YAP: Programming Model




hXp://www.flickr.com/photos/dimitridf/2841804136/ 
YAP : Small View

 •  Small size
 •  Cached, needs to be
    fast
 •  Supports only: Html,
    Inline css, YML
YAP: Canvas View

 •  Loads external
    URL from your
    server
 •  Support for:
   •  Open social
   •  YML, CSS, HTML,
      JS
 •  Runs in an iFrame
    with Caja
 •  Yahoo! SDK
YAP - Accessing User Data
•  Guid
  –  Unique identifier for a user
  –  Public info, can be stored on your servers
•  Consumer Key / Secret
  –  Specifies “API Scopes”
  –  Enables to query Yahoo! WS
  –  Necessary for OAuth 1.1 authentication
  –  Automatically created for you in devTool
Social Platforms: Available APIs
•  Social Directory: One Social Graph
  –  Contacts, connections & profile data
•  Updates
  –  Syndicate user content & activity
•  Presence
  –  Read, write presence
•  SDK simplifies access
•  Make it easy: YQL


                        ‐  ‐ 
YML: Yummy Language To Get You Started

•  Enables you to get cool features fast
 –  <yml:a view=”Full” params=”prefs.php”/>
   •  Enables ajaxy behaviors in SmallView
 –  <yml:profile-pic uid=”XXX”>
 –  <yml:name uid=”viewer” linked="true"/>
 –   <yml:friend-selector uid="viewer"/>  
 –  <yml:user-badge uid="viewer" linked="true” />   

More: hXp://developer.yahoo.com/yap/guide/yapdev‐yml.html  



                             ‐  ‐ 
YAP Cautions
•  Your gadget URL needs to be a prod host
•  Not all HTML/JS will run for security
     •  JS/HTML will be cajoled
     •  YML and OpenSocial are whitelisted
•  Small view:
     •  No Javascript
     •  NO CSS
     •  No <a> Links except
        via YML
2. Y! Social APIs




        hXp://developer.yahoo.com/social/ 
User Data                      ConnecBons 


                         Status 




                                         Updates 




      hXp://pulse.yahoo.com/sahni_saurabh 
YAHOO! MESSENGER 
Y! Social APIs

           SOCIAL 
           DIRECTORY  



                     YAHOO! 
                     CONTACTS 


                                 STATUS 




                                           UPDATES 




       hXp://developer.yahoo.com/social/ 
Leverage Yahoo!’s 600+ million
     users in your social
         applications
  with Yahoo!’s Social APIs.
Two ways use Social APIs


             Open applicaBons are applicaBons
             that run on the Yahoo! network or
             other open social containers 

             OAuth applicaBons are standalone
             applicaBons that run off the Yahoo!
             network. 
Easiest way to use
 Social APIs is via
       YQL
hXp://developer.yahoo.com/yql/console/ 




hXp://developer.yahoo.com/yql/console/ 
Fetching your profile data


 select * from social.profile
 where guid=me;
Profile Data 
Finding your contacts


 select * from social.contacts
 where guid=me;
Contacts 
Fetching any user’s profile data


  select * from social.profile
  where guid=
  ‘7VABDKK365VEHCUDYFO6HUSKQM’;
Fetching your updates



 select * from social.updates
 where guid=me;
Updates 
Updates from your contacts



 select * from
 social.contacts.updates where
 guid=me;
Updates Firehose




Access all Yahoo! Updates in real time via YQL
                        hXp://www.flickr.com/photos/thomashawk/250792779/ 
Update Sources: 75+




http://developer.yahoo.com/social/rest_api_guide/updates-
update_sources.html
Updates Firehose 
Finding updates about iPad



 select * from
 social.updates.search where
 query=’iPad';
Updates associated with nytimes.com


 select * from
 social.updates.search where
 link='huffingtonpost.com';
Tweets in Yahoo! Updates


 select * from
 social.updates.search where
 source = 'twitter';
Updates from your application


 select * from
 social.updates.search where
 source = '7BNRkt42';
 Y! Social SDK 
                                                     What can you do? 



                                      44 
hXp://www.flickr.com/photos/phploveme/2847931240/ 
Yahoo! Social SDK – Features 
•  Examples for OpenSocial, PHP, Python
•  Performs OAuth authorizaiton
•  REST calls to the Yahoo! Social Web
   Services
  –  Fetching Profiles
  –  Fetching and Inserting Updates
  –  Fetching Connections
  –  Executing YQL
SDK Languages 
         hIp://developer.yahoo.com/social/sdk/ 
Scalable Hosting


          hXp://signup.joyent.com/yahoo_signup  
Example Apps
Flixter on Yahoo!



USER DATA                  AUTHENTICATION 




                             CONTACTS 



 DATA  
                                UPDATES   

               LOCATION 
Updatesville
Updatesville
Social Search




                Social Search
Social Search
What can you do?
•  Materialize Social Graph data for engaging
   experiences
•  Build apps for Yahoo! network and reach
   600M+ audience
•  Use updates API to make your hacks viral
•  Improve social search experience
•  Think social games!
•  Personalize your hacks with Yahoo! Profile
   data. Use Yahoo! Login.
Hack: Updates in your language




             hXp://www.flickr.com/photos/dimitridf/2841804136/
DEMO
hXps://developer.apps.yahoo.com/projects/  
hXps://developer.apps.yahoo.com/projects/ 
Gadget XML: hXp://github.com/saurabhsahni/Hacks  
PHP Code: hXp://github.com/saurabhsahni/Hacks 
PHP Example: OAuth Dance 
$session =
YahooSession::requireSession($key,
$secret, $app_id)

$user = $session->getSessionedUser();

var_dump($user);
Social Data with YQL ‐ Recap  
select * from social.profile where guid=me

select * from social.connections where
owner_guid=me

select message from social.profile.status where
guid=me

select * from social.updates where guid=me
PHP Example: ExecuUng YQL 
$session =
YahooSession::requireSession($key,
$secret, $app_id)

$results = $session->query(‘select * from
social.updates where guid=me’);

var_dump($results);
PHP Example: InserUng Updates 
$session = YahooSession::requireSession
($key, $secret, $app_id)

$user = $session->getSessionedUser();

$update = $user->insertUpdate($suid, $title,
$link, $description);

var_dump($update);
GeVng Started ‐ DocumentaUon
•  Yahoo! Social APIs -
   http://developer.yahoo.com/social/

•  Meme APIs: http://developer.yahoo.com/meme/

•  Yahoo! Query Language -
   http://developer.yahoo.com/yql/

•  Yahoo! Social SDKs-
   http://developer.yahoo.com/social/sdk/

•  Examples - http://github.com/saurabhsahni/Hacks
THANK YOU! 



              Saurabh Sahni 
              hXp://www.saurabhsahni.com  
              hXp://twiXer.com/saurabhsahni 
              hXp://pulse.yahoo.com/sahni_saurabh  
              hXp://slideshare.net/saurabhsahni 
Appendix
What is OpenSocial? 



      •  OpenSocial API 
        •  For developing applicaUons on social 
           networks 
           •  Accessing social data (profiles, connecUons) 
           •  Fetching and inserUng acUviUes 
        •  Implemented by many containers 
           •  Develop once, distribute broadly 
Python Example: OAuth Dance 
 oauthapp = yahoo.application.OAuthApplication (key,
 secret, app_id, callback)

 # fetch unauthorized request token
 request_token = oauthapp.get_request_token(callback)

 # authorize request token
 authorization_url =
 oauthapp.get_authorization_url(request_token)

 # refresh authorized request token with access token
 access_token =
 oauthapp.get_access_token(request_token)

 oauthapp.token = access_token
Python Example: Fetching Profile Data

oauthapp = yahoo.application.OAuthApplication(key, secret,
app_id, callback)

profile = oauthapp.getProfile()

print profile
Python Example: ExecuUng YQL 
oauthapp = yahoo.application.OAuthApplication(key, secret,
app_id, callback)

results = oauthapp.yql('select * from social.profile where
guid=me')

print results

More Related Content

Similar to HackU: IIT Madras: Hacking Yahoo! Social

Hack u iitb_social
Hack u iitb_socialHack u iitb_social
Hack u iitb_social
Rajesh Kumar
 
OAuth Introduction
OAuth IntroductionOAuth Introduction
OAuth Introduction
h_marvin
 
Social mediaprogramming part2-java-jax-london
Social mediaprogramming part2-java-jax-londonSocial mediaprogramming part2-java-jax-london
Social mediaprogramming part2-java-jax-london
Khanderao Kand
 

Similar to HackU: IIT Madras: Hacking Yahoo! Social (20)

Open Hack Day Bangalore: Hacking Yahoo! Social
Open Hack Day Bangalore: Hacking Yahoo! SocialOpen Hack Day Bangalore: Hacking Yahoo! Social
Open Hack Day Bangalore: Hacking Yahoo! Social
 
YAP - HackU 2011
YAP - HackU 2011YAP - HackU 2011
YAP - HackU 2011
 
Hack u iitb_social
Hack u iitb_socialHack u iitb_social
Hack u iitb_social
 
Building Social Business Applications with OpenSocial
Building Social Business Applications with OpenSocialBuilding Social Business Applications with OpenSocial
Building Social Business Applications with OpenSocial
 
Open Yahoo! - An Audience Platform for the Web
Open Yahoo! - An Audience Platform for the WebOpen Yahoo! - An Audience Platform for the Web
Open Yahoo! - An Audience Platform for the Web
 
Yahoo! Open Strategy (Y!OS) and Government
Yahoo! Open Strategy (Y!OS) and GovernmentYahoo! Open Strategy (Y!OS) and Government
Yahoo! Open Strategy (Y!OS) and Government
 
Oct. 4, 2011 webcast top 5 tips for building viral social web applications an...
Oct. 4, 2011 webcast top 5 tips for building viral social web applications an...Oct. 4, 2011 webcast top 5 tips for building viral social web applications an...
Oct. 4, 2011 webcast top 5 tips for building viral social web applications an...
 
Opening up Yahoo! to Users and Developers
Opening up Yahoo! to Users and DevelopersOpening up Yahoo! to Users and Developers
Opening up Yahoo! to Users and Developers
 
Yahoo Application Platform - Hack Day 2009
Yahoo Application Platform - Hack Day 2009Yahoo Application Platform - Hack Day 2009
Yahoo Application Platform - Hack Day 2009
 
Deep linking at App Promotion Summit
Deep linking at App Promotion SummitDeep linking at App Promotion Summit
Deep linking at App Promotion Summit
 
Open social & cmis oasistc-20100712
Open social & cmis   oasistc-20100712Open social & cmis   oasistc-20100712
Open social & cmis oasistc-20100712
 
Building a facebook application by php
Building a facebook application by phpBuilding a facebook application by php
Building a facebook application by php
 
Alex jubien-think mobile
Alex jubien-think mobileAlex jubien-think mobile
Alex jubien-think mobile
 
OAuth Introduction
OAuth IntroductionOAuth Introduction
OAuth Introduction
 
Web 30 and RSS
Web 30 and RSSWeb 30 and RSS
Web 30 and RSS
 
Barcamphanoi Opensocial Application Development
Barcamphanoi Opensocial Application DevelopmentBarcamphanoi Opensocial Application Development
Barcamphanoi Opensocial Application Development
 
Social Media Inside the Enterprise
Social Media Inside the EnterpriseSocial Media Inside the Enterprise
Social Media Inside the Enterprise
 
Social mediaprogramming part2-java-jax-london
Social mediaprogramming part2-java-jax-londonSocial mediaprogramming part2-java-jax-london
Social mediaprogramming part2-java-jax-london
 
Social media & Telecom
Social media & TelecomSocial media & Telecom
Social media & Telecom
 
Facebook Open Graph - The Semantic Wallet
Facebook Open Graph - The Semantic WalletFacebook Open Graph - The Semantic Wallet
Facebook Open Graph - The Semantic Wallet
 

More from Saurabh Sahni

Finding things with BOSS
Finding things with BOSSFinding things with BOSS
Finding things with BOSS
Saurabh Sahni
 
Let the hacking continue - Post Open Hack India Mixer
Let the hacking continue - Post Open Hack India MixerLet the hacking continue - Post Open Hack India Mixer
Let the hacking continue - Post Open Hack India Mixer
Saurabh Sahni
 

More from Saurabh Sahni (19)

Hacking 101 & Yahoo Mobile Developer Suite - YMDC NYC
Hacking 101 & Yahoo Mobile Developer Suite - YMDC NYCHacking 101 & Yahoo Mobile Developer Suite - YMDC NYC
Hacking 101 & Yahoo Mobile Developer Suite - YMDC NYC
 
Hacking & everything you need to survice a hackday - Yahoo! Agency Hack Day N...
Hacking & everything you need to survice a hackday - Yahoo! Agency Hack Day N...Hacking & everything you need to survice a hackday - Yahoo! Agency Hack Day N...
Hacking & everything you need to survice a hackday - Yahoo! Agency Hack Day N...
 
Finding things on the web with Yahoo! BOSS: IIT Delhi
Finding things on the web with Yahoo! BOSS: IIT DelhiFinding things on the web with Yahoo! BOSS: IIT Delhi
Finding things on the web with Yahoo! BOSS: IIT Delhi
 
Hacking 101
Hacking 101Hacking 101
Hacking 101
 
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
 
Hacking for Innovation - WPP, New York
Hacking for Innovation - WPP, New YorkHacking for Innovation - WPP, New York
Hacking for Innovation - WPP, New York
 
Innovating the Hacker Way
Innovating the Hacker WayInnovating the Hacker Way
Innovating the Hacker Way
 
Finding things with BOSS
Finding things with BOSSFinding things with BOSS
Finding things with BOSS
 
Let the hacking continue - Post Open Hack India Mixer
Let the hacking continue - Post Open Hack India MixerLet the hacking continue - Post Open Hack India Mixer
Let the hacking continue - Post Open Hack India Mixer
 
Hack 101 - IIT Delhi HackU 2011
Hack 101 - IIT Delhi HackU 2011Hack 101 - IIT Delhi HackU 2011
Hack 101 - IIT Delhi HackU 2011
 
YQL & Yahoo! APIs - Open Hack India 2011
YQL & Yahoo! APIs - Open Hack India 2011YQL & Yahoo! APIs - Open Hack India 2011
YQL & Yahoo! APIs - Open Hack India 2011
 
Yahoo! Open Stack & YQL
Yahoo! Open Stack & YQLYahoo! Open Stack & YQL
Yahoo! Open Stack & YQL
 
Hacking for Innovation: IIT Kharagpur
Hacking for Innovation: IIT KharagpurHacking for Innovation: IIT Kharagpur
Hacking for Innovation: IIT Kharagpur
 
Yahoo! Query Language - Hadoop India Summit 2011
Yahoo! Query Language - Hadoop India Summit 2011Yahoo! Query Language - Hadoop India Summit 2011
Yahoo! Query Language - Hadoop India Summit 2011
 
BOSS: Yahoo HackU IIIT Hyderabad
BOSS: Yahoo HackU IIIT HyderabadBOSS: Yahoo HackU IIIT Hyderabad
BOSS: Yahoo HackU IIIT Hyderabad
 
BOSS: Yahoo HackU IIIT Bangalore
BOSS: Yahoo HackU IIIT BangaloreBOSS: Yahoo HackU IIIT Bangalore
BOSS: Yahoo HackU IIIT Bangalore
 
BOSS Open Hack Day, Bangalore
BOSS Open Hack Day, BangaloreBOSS Open Hack Day, Bangalore
BOSS Open Hack Day, Bangalore
 
BOSS: HackU IIT Bombay
BOSS: HackU IIT BombayBOSS: HackU IIT Bombay
BOSS: HackU IIT Bombay
 
BOSS: HackU IIT Delhi
BOSS: HackU IIT DelhiBOSS: HackU IIT Delhi
BOSS: HackU IIT Delhi
 

Recently uploaded

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

HackU: IIT Madras: Hacking Yahoo! Social