Saurabh Sahni Developer, Hacker, Evangelist
Saurabh Sahni Developer, Hacker, Evangelist
7/2/10
Our Audience
7/2/10
Two ways to hack Yahoo! Social
1) Open Applications
Run your applications across Yahoo! Reach large Yahoo! audience
2) Social APIs
Syndicate UGC Leverage Yahoo!’s 600+ million users in your social applications
CONTACTS
SOCIAL DIRECTORY
UPDATES
STATUS
HOME PAGE
MY YAHOO!
…more coming soon
Y! TOOLBAR
PULSE
7/2/10
Open Applications
HOME PAGE
MY YAHOO!
…more coming soon
Y! TOOLBAR
PULSE
7/2/10
7/2/10
7/2/10
7/2/10
7/2/10
7/2/10
Why hack open apps?
MY APP
SOCIAL - Access user Profile & Connection data - Interactive, personalized
DISTRIBUTABLE - Discovery - Promotion
- Media buy enhanced
ENGAGING - Permanently parked in high-traffic starting points - Viral in nature
EASY TO BUILD - Quickly prototype idea within 24 hours
- Launch directly in production. No blockers!
7/2/10
YAP: Programming Model
http://www.flickr.com/photos/dimitridf/2841804136/
7/2/10
YAP : Small View
• Small View: • Cached, needs to be fast • Supports only: Html, Inline css, YML
• Can be pushed programmatically
• SetSmallView(guid, newYML)
• Can be updated with fresh content
• yml:include fetches new data from your servers
7/2/10
YAP: Canvas View
• Loads external URL from your server
• Support for: • Open social 0.8 (JS & REST) • YML, CSS, HTML, JS
• Runs in an iFrame with Caja
• Yahoo! SDK
7/2/10
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
7/2/10 - -
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
7/2/10 - -
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:include> • Enables to load fresh content once SmallView is loaded
• <yml:profile-pic uid=”XXX”> • <yml:name uid=”viewer” linked="true"/> • <yml:friend-selector uid="viewer"/> • <yml:user-badge uid="viewer" linked="true” />
More: http://developer.yahoo.com/yap/guide/yapdev-yml.html
7/2/10
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
7/2/10
Production Hosting
http://www.joyent.com/developers/yahoo
7/2/10
2. Social APIs
CONTACTS
SOCIAL DIRECTORY
UPDATES
STATUS
7/2/10 http://developer.yahoo.com/social/
7/2/10
7/2/10
7/2/10
7/2/10
YAHOO! MESSENGER
7/2/10
7/2/10
Easiest way to use Social APIs is via YQL
http://developer.yahoo.com/yql/console/
http://developer.yahoo.com/yql/console/
7/2/10
7/2/10
7/2/10
7/2/10
Updates Firehose
Access all Yahoo! Updates in real time via YQL http://www.flickr.com/photos/thomashawk/250792779/
7/2/10 Updates Firehose
7/2/10
More tuning
Query search: select * from social.updates.search where query='earthquake';
select * from social.updates.search where link='huffingtonpost.com';
Hacking: Updates in your language
http://www.flickr.com/photos/dimitridf/2841804136/
7/2/10
7/2/10
7/2/10
Get Yahoo! SDK http://developer.yahoo.com/social/sdk/
PHP SDK: http://github.com/yahoo/yos-social-php
7/2/10 https://developer.apps.yahoo.com/projects/
7/2/10 https://developer.apps.yahoo.com/projects/
7/2/10
7/2/10
Gadget XML: http://github.com/saurabhsahni/Hacks
7/2/10
7/2/10
7/2/10
7/2/10 Gadget XML: http://github.com/saurabhsahni/Hacks
7/2/10
7/2/10
7/2/10
7/2/10
Links
• Yahoo! Application Platform - http://developer.yahoo.com/yap/
• Yahoo! Social APIs - http://developer.yahoo.com/social/
• Yahoo! Query Language - http://developer.yahoo.com/yql/
• PHP SDK -http://github.com/yahoo/yos-social-php
• Examples - http://github.com/saurabhsahni/Hacks