"When using a desktop app and logging in, Facebook redirects people to the redirect_uri mentioned above and places an access token along with some other metadata (such as token expiry time) in the URI fragment:
https://www.facebook.com/connect/login_success.html# access_token=ACCESS_TOKEN... Your app needs to detect this redirect and then read the access token out of the URI using the mechanisms provided by the OS and development framework you are using. You can then skip straight to the Inspecting access tokens step."
This is what facebook documentation says about building a manual login flow through a desktop application. My question is how to read the access token from the redirected uri in a java desktop application?