The Huffington Post announced its integration with a variety of Yahoo! services today. You can add these services to your site too.

OpenID + OAuth (“Hybrid Auth”)

Hybrid Auth enables you to let users log into your site using their Yahoo! IDs. By using Yahoo! for authentication, you free yourself from the work associated with building and maintaining a registration and authentication flow. It makes life easier for your users too because they won’t have to create yet another account, and they can import pre-existing social connections to your site from the Hybrid Auth provider.

As a bonus, Hybrid Auth is composed entirely of open standards, as described in depth by Allen Tom in his YDN post Breaking News: Yahoo! OpenID on Huffington Post. OpenID forms the authentication half of Hybrid Auth. The second half is OAuth, which is used to authorize data access. In practical terms, this means your users can grant access to their data while they are logging in.

You can get more information on using these services with Yahoo! in the YDN documentation for the OpenID and OAuth. You can also find information, community, and client libraries for them on the OpenID and OAuth sites. The openid_oauth_hybrid_app project in the YDN Github repository contains code samples to demonstrate implementation of Hybrid Auth.

The Updates API

Yahoo!’s Updates API enables you to publish notifications to Yahoo!’s event stream. You can see this in action on The Huffington Post when you leave a comment on a post. Try this: go to The Huffington Post, log in using your Yahoo! ID, leave a comment on a story (note the checkbox under the comment area to “Post to Yahoo!”), visit profiles.yahoo.com, and view your event notification in the Updates feed under your profile picture.

screenshot of updates on a Yahoo! Profile page

Image credit: YDN

Get more information about the Updates API in the YDN documentation. The YDN also has a code sample in its Github account for publishing an update with an embedded image, as The Huffington Post and Meebo do.

The Social Directory APIs

If a user grants access, Hybrid Auth can be used to obtain a user’s name, email address, profile picture URL, and gender. If you add Profile data access to the list of APIs accessible by your OAuth key, you can conveniently import additional data from the user’s profile. This saves your user from having to enter and maintain duplicate profiles on two sites. You can see Yahoo! profile data on The Huffington Post site if you visit huffingtonpost.com, sign in using your Yahoo! ID, and then click on the text “Welcome {your name}” name under The Huffington Post header.

screenshot of Yahoo! profile data

Image credit: YDN

You can learn more about the Social Directory APIs, and how to request data from it, in the YDN documentation. Or, view a code sample demonstrating how to fetch this data in the YDN’s Github project Async(hronous) Profile Fetch.

The Yahoo! Application Platform (YAP)

Interact with your users on the Yahoo! network by creating a Yahoo! Application Platform (YAP) app. Your users can then install this app on the Yahoo! homepage and in their My Yahoo! accounts. The Huffington Post does an excellent job promoting their YAP app (http://apps.yahoo.com/-AIjuiA4o/) by providing a link to the app in the registration flow for their site. If you haven’t installed the Huffington Post app on your homepage yet, you’ll see a link for doing so above the app at the link above. On the Yahoo! homepage, apps are installed in the column on the left of the site. Click each entry to launch the app inline on the page.

screenshot of Huffington Post app

Image credit: YDN

Learn more about the Yahoo! Application Platform in the YDN YAP documentation. You can see sample code for creating an AJAX tab set in the YAP small view in the YDN Github account.

Erik Eldridge (@erikeldridge)
Yahoo! Developer Network

February 11, 2010 at 5:08 pm by Yahoo! Developer Network Blog
Topics: YOS