Search code examples
javascriptfacebookcordovaappmobi

getting facebook user ID


is there ant way to get Facebook user Id by passing the email and password of the user through a graph API....what i want to do is,i want to get the profile details of a particular user..if we know the user id then the details of the particular user can be obtained by the GRAPH API.. https://graph.facebook.com/ID

but i don't know how to get the Facebook user id.....please help me out.... I'm using JavaScript and html5 for mobile applications..both android and ios..and the IDE's are APPMOBI and PHONEGAP


Solution

  • You can try getting an access token by logging in using the username and password, then calling https://graph.facebook.com/me and getting the id field. I don't think there's a direct way of getting an id through the API just using the username and password without getting an access token for that user, which would require that the user accept your appId.