Andy Edinborough

ALL YOUR BASE ARE BELONG TO US

Getting Started with Yahoo and OAuth

Posted on January 29, 2010 in Code    Tagged c# oauth yql yahoo Tweet This

Yahoo doesn’t offer much help to .NET/C# developers when it comes to getting started with using their API’s and OAuth.  So I’ve put together a quick-hit starter pack.

  1. Yahoo! YQL Console
    This is fun for all ages!  I just get all giggly when I see all that Yahoo has made available through YQL (Yahoo Query Language).  You can use this tool to perfect your queries and figure out just what you want to accomplish.  As a supplement, you can check out the PDF Documentation as well as the online version.
  2. My Projects @ Yahoo Developer Network
    Once you’ve got your base application logic in place, you can request the keys you’ll need to communication with Yahoo using OAuth.  This will let you take advantage of the higher usage limit of 100,000 requests / day and 10,000 requests / hour.
  3. Simple C# OAuth Code
    Unfortunately, the C# OAuth libraries listed… Read More →

C# OAuth Implementation

Posted on December 17, 2009 in Code    Tagged .net c# yahoo oauth Tweet This

AAAARRRRGGGHHH!!

I had to get that out of my system.  I’m not familiar enough with the exact specification of OAuth to know whether it’s Yahoo or Yedda that can’t read a spec, but the Yedda implementation of OAuth available on Google Code, doesn’t even begin to work with Yahoo’s YQL API.  Futhermore, the Yedda implementation is bloated and hard to follow.  Why is it that so many programmers feel the need to over complicate EVEYRTHING.

So… Here’s my rewrite of the Yedda implemenation.  It works out-of-the-box.  There are no objects to instantiate, just 4 very simple static methods to use.  A word of caution, System.Net.WebClient cannot be used to talk to Yahoo.

Update (1/29/2010): See a complete working example of C# / OAuth / Yahoo YQL.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Security.Cryptography;
using System.Text;

namespace WAN.Lib {
    public static class OAuth {
        private static Random… Read More →
© 2013 Andy Edinborough. All your rights are belong to me.