Facebook Login/Authentication on Standalone

Hi!
Following the steps in :
http://doc.exitgames.com/en/realtime/current/tutorials/custom-auth-facebook-javascript

On section 3 it explains how to do the connexion with Facebook and shows some HTML code. I was wondering: how do I use this in a standalone build? Or is facebook login just for web player?

Comments

  • It's definitely not only for HTML5 / JS.
    We will add code snippets for C# and PUN in the next week.

    In the mean time:
    You have to use the FB API to get a token (just like in that JS sample). I don't know if that's a string or a byte[] but you basically have to create new AuthenticationValues with that and set it as AuthValues:
    [code2=csharp]PhotonNetwork.AuthValues = new AuthenticationValues();
    PhotonNetwork.AuthValues.AuthType = CustomAuthenticationType.Facebook;
    PhotonNetwork.AuthValues.SetAuthParameters(token); // maybe use SetAuthPostData(byte[] token)...[/code2]

    The GuiCustomAuth class in the PUN package does something similar.
    Like I said, we can most likely update the doc next week.
Sign In or Register to comment.