I use the Facebook Unity Official SDK code below to login in StandAlone platform
FB.Login(“email,publish_actions”, LoginCallback);
and push “Find Access Token” button and copy paste the Access Token to login
but got an error below:
Could not get data from access token: The given key was not present in the dictionary.
UnityEngine.Debug:LogError(Object)
FbDebug:Error(String)
Facebook.EditorFacebook:BadAccessToken(String) (at Assets/Facebook/Scripts/EditorFacebook.cs:262)
Facebook.EditorFacebook:MockLoginCallback(FBResult) (at Assets/Facebook/Scripts/EditorFacebook.cs:251)
Facebook.c__Iterator0:MoveNext()
and I add debug code
publicvoidMockLoginCallback(FBResultresult)
{
Debug.Log(result.Text);//i added
Destroy(FBComponentFactory.GetComponent());
…(skip)
}
the debug result is below:
[{“code”:400,“headers”:[{“name”:“Expires”,“value”:“Sat, 01 Jan 2000 00:00:00 GMT”},{“name”:“Cache-Control”,“value”:“no-store”},{“name”:“Access-Control-Allow-Origin”,“value”:““},{“name”:“Pragma”,“value”:“no-cache”},{“name”:“Content-Type”,“value”:“text/javascript; charset=UTF-8”},{“name”:“Facebook-API-Version”,“value”:“v2.2”},{“name”:“WWW-Authenticate”,“value”:“OAuth "Facebook Platform" "invalid_request" "An active access token must be used to query information about the current user."”}],“body”:”{"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500}}“},{“code”:200,“headers”:[{“name”:“Expires”,“value”:“Sat, 01 Jan 2000 00:00:00 GMT”},{“name”:“Cache-Control”,“value”:“private, no-cache, no-store, must-revalidate”},{“name”:“Access-Control-Allow-Origin”,“value”:””},{“name”:“Pragma”,“value”:“no-cache”},{“name”:“Content-Type”,“value”:“text/javascript; charset=UTF-8”},{“name”:“ETag”,“value”:“"0b19857c7e718c7c3e075adec68ac21e8c6241a5"”},{“name”:“Facebook-API-Version”,“value”:“v2.2”}],“body”:“{"id":"1538192786422654"}”}]
I can login before,but I don’t know what I have been changed to get this bug.

