Hack u iitb_social
-
Upload
rajesh-kumar -
Category
Technology
-
view
1.303 -
download
0
Transcript of Hack u iitb_social
![Page 1: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/1.jpg)
`̀
Hacking Yahoo! Social
Rajesh Kumar S ADeveloper, Hacker, Evangelist
![Page 2: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/2.jpg)
Yahoo! Audience is the Platform
![Page 3: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/3.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/4.jpg)
Y! Social APIs
http://developer.yahoo.com/social/
![Page 5: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/5.jpg)
![Page 6: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/6.jpg)
![Page 7: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/7.jpg)
![Page 8: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/8.jpg)
YAHOO! MESSENGER
![Page 9: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/9.jpg)
Y! Social APIs
http://developer.yahoo.com/social/
SOCIAL DIRECTORY
YAHOO! CONTACTS
STATUS
UPDATES
![Page 10: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/10.jpg)
Leverage Yahoo!’s 600+ million
users in your social applications
with Yahoo!’s Social APIs.
![Page 11: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/11.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/12.jpg)
Easiest way to use Social APIs is via
YQL
![Page 13: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/13.jpg)
http://developer.yahoo.com/yql/console/
http://developer.yahoo.com/yql/console/
![Page 14: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/14.jpg)
select * from social.profile where guid=me;
Fetching your profile data
![Page 15: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/15.jpg)
Profile Data
![Page 16: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/16.jpg)
select * from social.contacts where guid=me;
Finding your contacts
![Page 17: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/17.jpg)
Contacts
![Page 18: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/18.jpg)
select * from social.profile where guid=
‘7VABDKK365VEHCUDYFO6HUSKQM’;
Fetching any user’s profile data
![Page 19: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/19.jpg)
select * from social.updates where guid=me;
Fetching your updates
![Page 20: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/20.jpg)
Updates
![Page 21: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/21.jpg)
select * from social.contacts.updates where guid=me;
Updates from your contacts
![Page 22: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/22.jpg)
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 23: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/23.jpg)
Update Sources: 75+
http://developer.yahoo.com/social/rest_api_guide/updates-update_sources.html
![Page 24: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/24.jpg)
Updates Firehose
![Page 25: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/25.jpg)
select * from social.updates.search where query='cwg';
Finding updates about CWG
![Page 26: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/26.jpg)
select * from social.updates.search where link='techcrunch.com';
Updates associated with techcrunch.com
![Page 27: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/27.jpg)
SELECT * FROM social.updates.search WHERE woeid=2295420;
Updates associated with a location
![Page 28: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/28.jpg)
select * from social.updates.search where source = 'twitter';
Tweets in Yahoo! Updates
![Page 29: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/29.jpg)
select * from social.updates.search where source = '7BNRkt42';
Updates from your application
![Page 30: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/30.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/31.jpg)
• 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](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/32.jpg)
http://developer.yahoo.com/social/sdk/
SDK Languages
![Page 33: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/33.jpg)
$session = YahooSession::requireSession($key, $secret, $app_id)
$user = $session->getSessionedUser();
var_dump($user);
PHP Example: OAuth Dance
![Page 34: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/34.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/35.jpg)
$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](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/36.jpg)
$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](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/37.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/38.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/39.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/40.jpg)
• 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](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/41.jpg)
Example AppsExample Apps
![Page 42: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/42.jpg)
Updatesville
![Page 43: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/43.jpg)
Social Search
Social Search
![Page 44: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/44.jpg)
Social Search
![Page 45: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/45.jpg)
• 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](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/46.jpg)
Hack: Updates in your language
http://www.flickr.com/photos/dimitridf/2841804136/
![Page 47: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/47.jpg)
![Page 48: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/48.jpg)
DEMODEMO
![Page 49: Hack u iitb_social](https://reader036.fdocuments.us/reader036/viewer/2022081602/554a0f92b4c9058c5d8b4961/html5/thumbnails/49.jpg)
THANK YOU!THANK YOU!