I have scoured through the forums and cannot resolve the "32755" error message when attempting to connect to Photon Chat .
I know I have to use the Chat ID provided by PlayFab Add-Ons and am doing so. I can connect the Photon Cloud, PlayFab and Facebook (login) with no errors. Players can even play games without connection errors.
Only the Chat ID appears to be bad or I am implementing it incorrectly. I have seen some people say pass the PlayFabID and other just a username. Neither have worked. Here is my latest version of the code.
PlayFabFacebookLogin.cs
private void AuthenticateWithPhoton(GetPhotonAuthenticationTokenResult obj) { LogMessage("Photon token acquired: " + obj.PhotonCustomAuthenticationToken + " Authentication complete."); //We set AuthType to custom, meaning we bring our own, PlayFab authentication procedure. var customAuth = new AuthenticationValues { AuthType = CustomAuthenticationType.Custom }; //We add "username" parameter. Do not let it confuse you: PlayFab is expecting this parameter to contain player PlayFab ID (!) and not username. customAuth.AddAuthParameter("user_id", PlayFabID); // expected by PlayFab custom auth service //We add "token" parameter. PlayFab expects it to contain Photon Authentication Token issues to your during previous step. customAuth.AddAuthParameter("token", obj.PhotonCustomAuthenticationToken); //We finally tell Photon to use this authentication parameters throughout the entire application. PhotonNetwork.AuthValues = customAuth; PhotonNetwork.AuthValues.UserId = PlayFabID; // this is important //Start chat service chatManager.InitChat(obj.PhotonCustomAuthenticationToken); //not sure if token was required but passed just in case }
ChatManager.cs
public void InitChat(string token) { // In the C# SDKs, the callbacks are defined in the `IChatClientListener` interface. // In the demos, we instantiate and use the ChatClient class to implement the IChatClientListener interface. chatClient = new ChatClient(this); ChatStatus.text = "Initiating chat client..."; // Set your favourite region. "EU", "US", and "ASIA" are currently supported. chatClient.ChatRegion = "US"; ExitGames.Client.Photon.Chat.AuthenticationValues authVals = new ExitGames.Client.Photon.Chat.AuthenticationValues(playFabFB.PlayFabID); authVals.AuthType = ExitGames.Client.Photon.Chat.CustomAuthenticationType.Custom; authVals.AddAuthParameter("userid", playFabFB.PlayFabID); authVals.AddAuthParameter("token", token); chatClient.AuthValues = authVals; chatClient.Connect(PhotonNetwork.PhotonServerSettings.ChatAppID, "1.0", authVals); }
Also, I tried running the Photon Chat Demo App (Unity) and it also returned the same error code "32755".