Updated to use AIR 3.1 spec.
Fixed issue with invalid redirect URI in sample code