0

Token returned by FBSDKGraphRequest is 10211282278486891. How can I get the userID with token from FBSDKGraphRequest? My userID is kukod.j. How get it programmatically? How would Facebook forward after loading https://www.facebook.com/10211282278486891 in browser?

Checked How to get the Facebook user id using the access token but it did not helped at all, it return token and not user ID.

János
  • 32,867
  • 38
  • 193
  • 353
  • Just make an API request for `/me` using the user access token ... – CBroe Jun 01 '17 at 08:19
  • Value for "id" is the token and not the user id. – János Jun 01 '17 at 08:36
  • Your question title said you had an access token, and wanted to get the user id from there. _"My userID is kukoda.janos"_ - no, it is not, that is your profile "user name". And that that field has been removed with API v2.0 already. – CBroe Jun 01 '17 at 08:39
  • So for profile user name I need to simulate opening it with browser?! – János Jun 01 '17 at 12:36
  • That would a) be against Facebook’s ToS, and b) you would not get an app-scoped user id belonging to your own app that way. // Why do you need this in the first place? For users that log in to your app, you will already get their ID that way - and users that did not log in to your app, are rather none of your app’s business to begin with ... so, what do you need this for? – CBroe Jun 01 '17 at 13:22

0 Answers0