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

前端 未结 8 2510
鱼传尺愫
鱼传尺愫 2021-02-05 21:51

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

8条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-05 22:42

    You can get the user ID with this code :

    document.getElementById('status').innerHTML =
       'Welcome ' + response.name + '!' + "
    "+ 'Your user ID is : ' + response.id;

提交回复
热议问题