Search code examples
facebookunity-game-enginefacebook-graph-api

How To Get User Name From Facebook Unity SDK


I am new in unity and trying to integrate Facebook unity SDK. But i am not able to find current logged-in user name. It will return only userId and accessToken. How to get login name after FB.Login("email")


Solution

  • After you login, you can get the name with:

    FB.API("me?fields=name", Facebook.HttpMethod.GET, <your callback here>);