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>
You should be used new facebook sdk 3.0 and
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);
if (Session.getActiveSession().isOpened()) {
// Request user data and show the results
Request.executeMeRequestAsync(Session.getActiveSession(), new Request.GraphUserCallback() {
@Override
public void onCompleted(GraphUser user, Response response) {
// TODO Auto-generated method stub
if (user != null) {
// Display the parsed user info
Log.v(TAG, "Response : " + response);
Log.v(TAG, "UserID : " + user.getId());
Log.v(TAG, "User FirstName : " + user.getFirstName());
}
}
});
}
}