I use the official Facebook SDK in my Android Application. After the user logs in, I can get the uid and the name of the facebook user like so:
Facebook mFac
Add one line of code and that will be resolved.
HttpURLConnection.setFollowRedirects(true);