Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get FB User ID using Facebook Login Button in android application

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.

like image 739
Anupam Avatar asked Mar 22 '13 10:03

Anupam


People also ask

What is a Facebook app user ID?

User ID. Your User ID is a string of numbers that doesn't personally identify you but does connect to your Facebook profile. You have a User ID automatically, whether or not you choose to create a username. Learn how to find your user ID.


1 Answers

loginResult.getAccessToken().getUserId()
like image 161
Jonathan Caicedo Avatar answered Nov 11 '22 20:11

Jonathan Caicedo