Capture the current facebook-android api user id

With the graphical API for Android, I can get the current user information with calls to / me.

Everything is still fine, but I can’t find a way to capture the real user ID (numbers)? How can I do that?

+4
source share
1 answer

/me returns a JSON object with an id field (and others). You can parse this JSON object as follows:

 JSONObject json = Util.parseJson(facebook.request("me", params)); String userId = json.getString("id"); 
+12
source

All Articles