49
` Hacking Yahoo! Social Rajesh Kumar S A Developer, Hacker, Evangelist

Hack u iitb_social

Embed Size (px)

Citation preview

Page 1: Hack u iitb_social

Hacking Yahoo! Social

Rajesh Kumar S ADeveloper, Hacker, Evangelist

Page 2: Hack u iitb_social

Yahoo! Audience is the Platform

Page 3: Hack u iitb_social

1) Social APIs

Syndicate UGCGet referral traffic back to your site

Two ways to hack Yahoo! Social

2) Open Applications

Run your applications across Yahoo!Reach large Yahoo! audience

HOME PAGE

MY YAHOO!

…more coming soon

Y! TOOLBAR

PULSECONTACTS

SOCIAL DIRECTORY UPDATES

STATUS

Page 4: Hack u iitb_social

Y! Social APIs

http://developer.yahoo.com/social/

Page 5: Hack u iitb_social
Page 6: Hack u iitb_social
Page 7: Hack u iitb_social
Page 8: Hack u iitb_social

YAHOO! MESSENGER

Page 9: Hack u iitb_social

Y! Social APIs

http://developer.yahoo.com/social/

SOCIAL DIRECTORY

YAHOO! CONTACTS

STATUS

UPDATES

Page 10: Hack u iitb_social

Leverage Yahoo!’s 600+ million

users in your social applications

with Yahoo!’s Social APIs.

Page 11: Hack u iitb_social

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

OAuth applications are standalone applications that run off the Yahoo! network.

Two ways to use Social APIs

Page 12: Hack u iitb_social

Easiest way to use Social APIs is via

YQL

Page 13: Hack u iitb_social

http://developer.yahoo.com/yql/console/

http://developer.yahoo.com/yql/console/

Page 14: Hack u iitb_social

select * from social.profile where guid=me;

Fetching your profile data

Page 15: Hack u iitb_social

Profile Data

Page 16: Hack u iitb_social

select * from social.contacts where guid=me;

Finding your contacts

Page 17: Hack u iitb_social

Contacts

Page 18: Hack u iitb_social

select * from social.profile where guid=

‘7VABDKK365VEHCUDYFO6HUSKQM’;

Fetching any user’s profile data

Page 19: Hack u iitb_social

select * from social.updates where guid=me;

Fetching your updates

Page 20: Hack u iitb_social

Updates

Page 21: Hack u iitb_social

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

Updates from your contacts

Page 22: Hack u iitb_social

Access all Yahoo! Updates in real time via YQL

Updates Firehose

http://www.flickr.com/photos/thomashawk/250792779/http://www.flickr.com/photos/thomashawk/250792779/

Page 24: Hack u iitb_social

Updates Firehose

Page 25: Hack u iitb_social

select * from social.updates.search where query='cwg';

Finding updates about CWG

Page 26: Hack u iitb_social

select * from social.updates.search where link='techcrunch.com';

Updates associated with techcrunch.com

Page 27: Hack u iitb_social

SELECT * FROM social.updates.search WHERE woeid=2295420;

Updates associated with a location

Page 28: Hack u iitb_social

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

Tweets in Yahoo! Updates

Page 29: Hack u iitb_social

select * from social.updates.search where source = '7BNRkt42';

Updates from your application

Page 30: Hack u iitb_social

30

Y! Social SDK What can you do? Y! Social SDK What can you do?

http://www.flickr.com/photos/phploveme/2847931240/

Page 31: Hack u iitb_social

• 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

Yahoo! Social SDK – Features

Page 32: Hack u iitb_social

http://developer.yahoo.com/social/sdk/

SDK Languages

Page 33: Hack u iitb_social

$session = YahooSession::requireSession($key, $secret, $app_id)

$user = $session->getSessionedUser();

var_dump($user);

PHP Example: OAuth Dance

Page 34: Hack u iitb_social

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

Social Data with YQL - Recap

Page 35: Hack u iitb_social

$session = YahooSession::requireSession($key, $secret, $app_id)

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

var_dump($results);

PHP Example: Executing YQL

Page 36: Hack u iitb_social

$session = YahooSession::requireSession ($key, $secret, $app_id)

$user = $session->getSessionedUser();

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

var_dump($update);

PHP Example: Inserting Updates

Page 37: Hack u iitb_social

Python Example: OAuth Dance

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

# fetch unauthorized request tokenrequest_token = oauthapp.get_request_token(callback)

# authorize request tokenauthorization_url = oauthapp.get_authorization_url(request_token)

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

oauthapp.token = access_token

Page 38: Hack u iitb_social

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

profile = oauthapp.getProfile()

print profile

Python Example: Fetching Profile Data

Page 39: Hack u iitb_social

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

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

print results

Python Example: Executing YQL

Page 40: Hack u iitb_social

• 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

Getting Started - Documentation

Page 41: Hack u iitb_social

Example AppsExample Apps

Page 42: Hack u iitb_social

Updatesville

Page 43: Hack u iitb_social

Social Search

Social Search

Page 44: Hack u iitb_social

Social Search

Page 45: Hack u iitb_social

• 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.

What can you do?

Page 46: Hack u iitb_social

Hack: Updates in your language

http://www.flickr.com/photos/dimitridf/2841804136/

Page 47: Hack u iitb_social
Page 48: Hack u iitb_social

DEMODEMO

Page 49: Hack u iitb_social

THANK YOU!THANK YOU!