JavaFX + OAuth

As usual will start off with Wikipedia – OAuth (Open Authorization) – is an open standard that allows users to share their private resources (e.g. photos, videos, contact lists) stored on one site with another site without having to hand out their username and password. With more and more services moving to OAuth model, I think we need to try to have a generic implementation. Here is an attempt…

I prefer not to duplicate all those details available in various resources, so suggest to read few articles if you are not familiar with concepts of OAuth. Yahoo has a very detailed article outlining the flow of OAuth authorization or Beginner’s Guide to OAuth from Hueniverse. Please refer to same for more info..

You can try out yourself with demo below. You need to get consumer-key and consumer-secret from respective service providers – Twitter, LinkedIn or Yahoo

To launch click on above image or

First enter oauth_consumer_key and oauth_secret_key, click “Request Token” button. If key is proper, you will receive a message in log with a URL. Copy and paste that URL in browser and follow the instructions. Once you grant access to your application, it will return a number. Copy the number and paste it as oauth_verifier. Now click on “Access Token” button. It will return you oauth_token and oauth_token_secret which can be used for all subsequent communication.

Yes its a bit difficult to understand the overall flow and implementation. I have tried my best to simplify it. The API may be simplified a bit more. I have signed up for contributing to JFXtras long time back, but haven’t done anything yet. My objective was to pull in the various parsers that are used in different samples and create a library. I think all these can be incorporated into that…


def oauthAPI = OAuthAPI.getInstance(

// Request Token Callback
oauthAPI.onRequestToken = function(response:String: Void {


// Access Token Callback
oauthAPI.onAccessToken = function(response:String: Void {


// Request Token

// Access Token

Refer to LinkedInAPI.fx to get an idea on how we can extend the implementation to have fulll fledged support.

Please try it out and let me know your suggestions and feedback..

JavaFX + Yahoo Weather

Bookmark and Share

JavaFX Composer preview is available. You can install this plugin. In NetBeans IDE, goto “Tools” -> “Plugins” -> “Available Plugins”. Select “JavaFX Composer” and install the Plugin. Please refer to NetBeans JavaFX Composer for more information.

Summer has set in like a flick of a switch! So couldn’t think of anything else other than Weather. Developed a simple Weather application using Yahoo Weather RSS Feed. It was much easier to visualize and develop using JavaFX Composer, especially for small widget like applications. Soon we will be able to develop complex application using this…

To launch click on above image or

The city is set to Bangalore city by default. Double click on the widget to enable the TextBox, in which you can enter your ZipCode or City and press “Enter” key. Ideally I must persist this information using Storage APIs, but I leave that task to you!

For getting the information from Yahoo, we need to first identify the Where On Earth ID – WOEID of the city using its ZipCode or Name. Please refer to Yahoo WOEID documentation for more information. Once we identify the WOEID, we can use forecastrss feed for getting the weather information.

Please try it out and let me know feedback..

JavaFX + Yahoo Placemaker + Maps

I have my travel itinerary or a document with list of cities, such as Seven Wonders of the World. I would like to retrieve the list of cities and the location information associated with it. How to do this??

Yahoo! released new Yahoo! Placemaker APIs. These APIs search for name of places in plain text document and returns the latitude and longitude associated with the place. You can either provide a text or a URL as input to the API. The output can be obtained in XML or RSS format.

Combine above information with Yahoo! Maps will return the maps associated with all places mentioned in specified document! Itn’t that cool?! 🙂

May be I must write more applications and publish at Java-Store!

For Applet mode, click on above image

For standalone mode

In above application we provide a URL which the Placemaker API will parse and returns the list of places. This information is given to Map Image API to retrieve the image. Any valid http URL can be provided as input. There is currently a 50 kbs limit for documents processed by Placemaker. Documents above this length are rejected and returns status 413. Please enter a new URL in textfield and press enter to load new places.


var dzone_url = “;;
var dzone_style = ‘2’;

digg_skin = ‘compact’;
digg_window = ‘new’;