I have been reading a lot about how OAuth works. For me, where my projects are in Java, what turned out to be the best way to learn about OAuth was articles by Xiaobo Yang. Here’s the link to the first of three: “Accessing social networking Web sites through OAuth“. I worked through the examples in the first two articles.
What I liked:
- The author explains OAuth very well, especially the overview of OAuth and why you should use the OAuth protocols.
- The examples are easy to follow. He builds just what you need to see it work.
- There are many screenshots, and that makes it easy to see when you’ve taken a wrong step.
The only thing you need to watch out for is the version of Twitter4j that you get. Since the time the article was written, Twitter4J has changed. I was worried that I might have to work out how to upgrade to the new version. I found that the sample code from Mr. Yang worked just fine even though some of the methods it used in Twitter4J were deprecated.
My thanks go to Mr Yang and the developers of Twitter4J.