I'm developing an application in which I'm using Facebook
log in button from SDK. I'm able to get access_token
of the user but I want userID
too. I have tried almost everything but was not successful. I have used facebook tutorial for achieving that. Here is the link: Facebook Login Button
Please help me in getting userID
from the same login button.
Any kind of help will be appreciated.
Use the getId method of FB Profile class( Facebook SDK 4.0).
Profile profile = Profile.getCurrentProfile();
System.out.println(profile.getFirstName());
System.out.println(profile.getId());