SlideShare a Scribd company logo
Hacking Yahoo! Social
     and Meme

                 Saurabh Sahni
        Developer, Hacker, Evangelist
User Data                      Connec/ons 


                         Status 




                                         Updates 




      h3p://pulse.yahoo.com/sahni_saurabh 
Open Hack Day Bangalore: Hacking Yahoo! Social
Open Hack Day Bangalore: Hacking Yahoo! Social
Open Hack Day Bangalore: Hacking Yahoo! Social
YAHOO! MESSENGER 
Y! Social APIs
    SOCIAL 
    DIRECTORY  



               YAHOO! 
               CONTACTS 


                           STATUS 




                                     UPDATES 




                                                MEME 



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


       Open applica/ons are applica/ons
       that run on the Yahoo! network or
       other open social containers 

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




h3p://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
                        h3p://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
    huffingtonpost.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';
Yahoo! Meme: meme.yahoo.com 
My Meme: h3p://meme.yahoo.com/saurabhsahni 
Yahoo! Meme Dashabord: meme.yahoo.com 
Meme API: http://developer.yahoo.com/meme/
Open Hack Day Bangalore: Hacking Yahoo! Social
Open Hack Day Bangalore: Hacking Yahoo! Social
More with meme
•  INSERT INTO meme.user.posts (type, content,
   caption) VALUES ("photo", "http://www.yahoo.com/
   myphoto.jpg", "this is the photo caption”)

•  INSERT INTO meme.user.posts (type, content,
   caption) VALUES ("video", "http://www.vimeo.com/
   12345", "this video is awesome")

•  SELECT * FROM meme.search WHERE
   query=”hackday”

•  SELECT * FROM meme.popular WHERE locale='in'
Y! Social SDK 
                                                     What can you do? 




                                     34 
h3p://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 
hHp://developer.yahoo.com/social/sdk/ 
Scalable Hosting


h3p://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
Slidememe
Open Hack Day Bangalore: Hacking Yahoo! Social
Slidememe




Slidememe
Hack: Updates in your language




            h3p://www.flickr.com/photos/dimitridf/2841804136/ 
DEMO
Open Hack Day Bangalore: Hacking Yahoo! Social
Open Hack Day Bangalore: Hacking Yahoo! Social
h3ps://developer.apps.yahoo.com/projects/  
h3ps://developer.apps.yahoo.com/projects/ 
Open Hack Day Bangalore: Hacking Yahoo! Social
Gadget XML: h3p://github.com/saurabhsahni/Hacks  
Open Hack Day Bangalore: Hacking Yahoo! Social
Open Hack Day Bangalore: Hacking Yahoo! Social
Open Hack Day Bangalore: Hacking Yahoo! Social
PHP Code: h3p://github.com/saurabhsahni/Hacks 
Open Hack Day Bangalore: Hacking Yahoo! Social
Open Hack Day Bangalore: Hacking Yahoo! Social
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: ExecuTng YQL 
$session = YahooSession::requireSession($key,
$secret, $app_id)

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

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

$user = $session->getSessionedUser();

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

var_dump($update);
GeUng Started ‐ DocumentaTon
•  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 
  h3p://www.saurabhsahni.com  
  h3p://twi3er.com/saurabhsahni 
  h3p://pulse.yahoo.com/sahni_saurabh  
  h3p://slideshare.net/saurabhsahni 
Appendix
What is OpenSocial? 




•  OpenSocial API 
  •  For developing applicaTons on social 
     networks 
     •  Accessing social data (profiles, connecTons) 
     •  Fetching and inserTng acTviTes 
  •  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: ExecuTng 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

PPT
Hack u iitb_social
PPTX
Hacking up location aware apps
PDF
Yql hacku iitd_2012
PDF
Facebook Platform for Developers
PPTX
YQL - HackU IIT Madras 2012
PDF
Facebook Open Graph API and How To Use It
PDF
Tracking online conversations with Yahoo Pipes
PDF
Hackuzela: Hacking Yahoo! Social
Hack u iitb_social
Hacking up location aware apps
Yql hacku iitd_2012
Facebook Platform for Developers
YQL - HackU IIT Madras 2012
Facebook Open Graph API and How To Use It
Tracking online conversations with Yahoo Pipes
Hackuzela: Hacking Yahoo! Social

What's hot (9)

PDF
Using social media as a powerful reporting tool handout - mandy jenkins - co...
PDF
Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017
PDF
Mobile Dev Trends and Confluence Mobile, AtlasCamp US 2012
PPT
Reyrey pecha kucha
PPTX
Experiments in Data Portability 2
PPT
Api pain points
PDF
Facebook für PHP Entwickler - phpugffm
PPTX
Hacking location aware apps
PDF
List of URL's Water Damage Restoration
Using social media as a powerful reporting tool handout - mandy jenkins - co...
Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017
Mobile Dev Trends and Confluence Mobile, AtlasCamp US 2012
Reyrey pecha kucha
Experiments in Data Portability 2
Api pain points
Facebook für PHP Entwickler - phpugffm
Hacking location aware apps
List of URL's Water Damage Restoration

Similar to Open Hack Day Bangalore: Hacking Yahoo! Social (20)

PDF
HackU: IIT Madras: Hacking Yahoo! Social
PPT
UWash Hack U - Y!OS
PPTX
Yahoo Open Platform Stack
PDF
Open at Yahoo
PDF
YDN KR Tech Talk : Pipes 와 YQL 활용하기
PPT
Future of Web Apps - Miami, FL - February 2009
PPTX
Open Hack NYC Yahoo Social SDKs
PPT
fowa miami
PDF
Things you can use (by the Yahoo Developer Network and friends)
PDF
The Yahoo Open Stack
PPT
Erikeldridge Yos V9
PPTX
Select * from internet
PPT
FOWA Miami 2009 - Y!OS
KEY
YQL: Select * from Internet
KEY
YQL:: Select * from Internet
PDF
Diving Into The Yahoo Open Stack
PPT
SEA Open Hack - YAP
PDF
Open social & cmis oasistc-20100712
KEY
UCLA HACKU'11
PDF
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
HackU: IIT Madras: Hacking Yahoo! Social
UWash Hack U - Y!OS
Yahoo Open Platform Stack
Open at Yahoo
YDN KR Tech Talk : Pipes 와 YQL 활용하기
Future of Web Apps - Miami, FL - February 2009
Open Hack NYC Yahoo Social SDKs
fowa miami
Things you can use (by the Yahoo Developer Network and friends)
The Yahoo Open Stack
Erikeldridge Yos V9
Select * from internet
FOWA Miami 2009 - Y!OS
YQL: Select * from Internet
YQL:: Select * from Internet
Diving Into The Yahoo Open Stack
SEA Open Hack - YAP
Open social & cmis oasistc-20100712
UCLA HACKU'11
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012

More from Saurabh Sahni (18)

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

Recently uploaded (20)

PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
Trump Administration's workforce development strategy
PDF
Classroom Observation Tools for Teachers
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
RMMM.pdf make it easy to upload and study
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Lesson notes of climatology university.
PDF
Hazard Identification & Risk Assessment .pdf
PDF
Empowerment Technology for Senior High School Guide
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Unit 4 Skeletal System.ppt.pptxopresentatiom
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Trump Administration's workforce development strategy
Classroom Observation Tools for Teachers
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Orientation - ARALprogram of Deped to the Parents.pptx
A powerpoint presentation on the Revised K-10 Science Shaping Paper
RMMM.pdf make it easy to upload and study
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
Weekly quiz Compilation Jan -July 25.pdf
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
History, Philosophy and sociology of education (1).pptx
Computing-Curriculum for Schools in Ghana
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Lesson notes of climatology university.
Hazard Identification & Risk Assessment .pdf
Empowerment Technology for Senior High School Guide
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx

Open Hack Day Bangalore: Hacking Yahoo! Social