This is an example for connecting to WP.com oAuth server. Visit below link for a live example