Skip to content

Instantly share code, notes, and snippets.

@tedliou
Created August 28, 2021 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tedliou/06a00273f419b67c363180f3e29c669e to your computer and use it in GitHub Desktop.
Save tedliou/06a00273f419b67c363180f3e29c669e to your computer and use it in GitHub Desktop.
private void AuthCallback(ILoginResult result)
{
if (FB.IsLoggedIn)
{
// AccessToken class will have session details
var aToken = AccessToken.CurrentAccessToken;
// Print current access token's User ID
Debug.Log(aToken.UserId);
// Print current access token's granted permissions
foreach (string perm in aToken.Permissions)
{
Debug.Log(perm);
}
}
else
{
Debug.Log("User cancelled login");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment