際際滷

際際滷Share a Scribd company logo
Hacking Yahoo! Social  Rajesh Kumar S A Developer, Hacker, Evangelist
Yahoo! Audience is the Platform
Social APIs Syndicate UGC Get 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 PULSE CONTACTS SOCIAL DIRECTORY UPDATES STATUS
Y! Social APIs http://developer.yahoo.com/social/
油
油
油
YAHOO! MESSENGER
Y! Social APIs http://developer.yahoo.com/social/ SOCIAL DIRECTORY  YAHOO! CONTACTS STATUS UPDATES
Leverage Yahoo!s 600+ million users in your social applications with Yahoo!s Social APIs.
Two ways to use Social APIs 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.
Easiest way to use Social APIs is via YQL
http://developer.yahoo.com/yql/console/ http://developer.yahoo.com/yql/console/
select * from social.profile  where guid=me;  Fetching your profile data
Profile Data
select * from social.contacts where guid=me;  Finding your contacts
Contacts
select * from social.profile  where guid=  7VABDKK365VEHCUDYFO6HUSKQM ;  Fetching any users profile data
select * from social.updates where guid=me;  Fetching your updates
Updates
select * from social.contacts.updates where guid=me;  Updates from your contacts
Access all Yahoo! Updates in real time via YQL Updates Firehose http://www.flickr.com/photos/thomashawk/250792779/
Update Sources: 75+ http ://developer.yahoo.com/social/rest_api_guide/updates-update_sources. html
Updates Firehose
select * from social.updates.search where query='cwg';  Finding updates about CWG
select * from social.updates.search where link='techcrunch.com';  Updates associated with techcrunch.com
SELECT * FROM social.updates.search WHERE woeid=2295420;  Updates associated with a location
select * from social.updates.search where source = 'twitter'; Tweets in Yahoo! Updates
select * from social.updates.search where source = '7BNRkt42'; Updates from your application
Y! Social SDK   What can you do? http://www.鍖ickr.com/photos/phploveme/2847931240/
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
http://developer.yahoo.com/social/sdk/ SDK Languages
$session = YahooSession::requireSession($key, $secret, $app_id) $user = $session->getSessionedUser(); var_dump($user); PHP Example: OAuth Dance
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
$session = YahooSession::requireSession($key, $secret, $app_id) $results = $session->query(select * from social.updates where guid=me); var_dump($results); PHP Example: Executing YQL
$session = YahooSession::requireSession ($key, $secret, $app_id) $user = $session->getSessionedUser(); $update = $user->insertUpdate($suid, $title, $link, $description); var_dump($update); PHP Example: Inserting Updates
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
oauthapp = yahoo.application.OAuthApplication(key, secret, app_id, callback) profile = oauthapp.getProfile() print profile Python Example: Fetching Profile Data
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
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
Example Apps
Updatesville
Social Search Social Search
Social Search
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?
Hack: Updates in your language http://www.flickr.com/photos/dimitridf/2841804136/
油
DEMO
THANK YOU!
油
油
https://developer.apps.yahoo.com/projects/
https://developer.apps.yahoo.com/projects/
油
Gadget XML:  http://github.com/saurabhsahni/Hacks
油
油
油
PHP Code:  http://github.com/saurabhsahni/Hacks
油
油

More Related Content

Hack u iitb_social

Editor's Notes

  1. Yahoos core strength is Audience! Substantial traffic opportunities to you It makes finding audience easy
  2. For that we have APIs Socdir: Access user profile data and connections. Yahoo contacts: Read & write users Yahoo! Address Book Read/write user's status data. Read, write, and delete a user's activity updates. Search, post and enjoy the Web's Memes. http://developer.yahoo.com/social/
  3. If you go to my pulse homepage, you can see what all your friends have been doing on different social sites
  4. All this cool but as a developer how can you play with social.
  5. For that we have APIs Socdir: Access user profile data and connections. Yahoo contacts: Read & write users Yahoo! Address Book Read/write user's status data. Read, write, and delete a user's activity updates. Search, post and enjoy the Web's Memes. http://developer.yahoo.com/social/
  6. OAuth is an open protocol, initiated by Blaine Cook and Chris Messina, to allow secure API authorization in a simple and standard method for desktop, mobile and web applications. For consumer developers, OAuth is a method to publish and interact with protected data. For service provider developers, OAuth gives users access to their data while protecting their account credentials. In other words, OAuth allows a user to grant access to their information on one site (the Service Provider), to another site (called Consumer), without sharing all of his or her identity.
  7. http://developer.yahoo.com/blogs/ydn/posts/2010/04/yahoo_updates_firehose/
  8. To get updates from Bangalore
  9. Flickr - YAP - - Social, Contacts, Updates, Status APIs http://developer.yahoo.com/yap/guide/index.html
  10. PHP, Python, Java, ActionScript 3, Objective-C, and OpenSocial
  11. SELECT * FROM social.updates WHERE guid=me SELECT * FROM social.updates WHERE source=7BNRkt42 SELECT * FROM social.connections.updates WHERE guid=me
  12. Community Resources Helping you be successful in using Yahoo! Web Services isn't just about code and documentation. We want to make it easy for developers to get in touch with us and others who are using our services to answer and ask questions, toss around ideas, and give your feedback on what services we could offer next. Forums YDN General Boards Design Patterns HotJobs Search YOS APT Music Widgets GeoPlanet OpenID Y! Groups Address Book Answers FireEagle Del.icio.us Traffic Flickr Mail Search BOSS Maps JavaScript Silverlight Merchant Solutions Search Marketing Exceptional Performance YUI Java .Net Flash YDN EU Auth PHP Python Ruby Perl Events Want your tech event appear in the YDN 'Upcoming Events' stream on developer.yahoo.com homepage? List your event on Upcoming and then add it to the Yahoo! Developer Network group on Upcoming. If you are setting up a tech event for developers or designers and would like some Yahoo! involvement, please contact us . Experts Yahoo! Developer Network is on the lookout for experts to share knowledge and help grow our developer communities. If you are interested in applying to moderate a *group* or forum and become an official expert, please contact us for more information. Remember, we pay in hugs, link-love and schwag only. Blog The YDN blog is where we talk about our various Yahoo! developer offerings and YDN events around the world. Your comments welcome. If you have a suggestion for the blog or a blog post you'd like to write about your experiences using our APIs or services, let us know. We are particularly interested in posts using Yahoo! APIs, tools, webservices and coverage of tech events. If you need inspiration or want to run some ideas by us, please contact us . YDN Theater YDN Theater is chock-full of API deep dives, developer interviews, cutting- edge technologies, and recaps of tech events you wish you hadn't missed. If you have an idea for a story, please contact us .