Search code examples
facebook-unity-sdkunity-web-player

Facebook SDK and WebPlayer. Init will not callback


Trying to let the Facebook SDK working with the WebPlayer. I have a problem with the init function: it's not calling the success callback and no exceptions are happening.

I want to explain what I'm trying to do. I have a standalone WebPlayer app loaded on my server (it's not a Facebook canvas). I would like to be able to login with Facebook to authenticate the user and show him/her customized stats (the name, the picture, etc...). No interactions required I would just use Facebook for the authentication.

Anyone any idea why this is not working?

Cheers


Solution

  • I had this problem as well, from what I can tell you can't use the Unity SDK unless you are on their canvas provided with the Unity Integration toggle in the Settings menu. You will have to use the JavaScript SDK. At least that is the conclusion I have come to.

    When trying to load the CanvasFacebook.dll the sdk will change the file path from "https://integrated-plugin-canvas-rsrc.fbsbx.com/rsrc/unity/lib/sdk_6.0/{0}.dll" to "WHERE_EVER_YOU'RE_SERVING_YOUR_CANVAS/rsrc/unity/lib/sdk_6.0/{0}.dll". That will cause the dll not to be able to load. That is easy enough to fix by just manually sending it to the original address. However once you call init from the dll with this fix in place, nothing happens.

    I assume that somewhere inside the dll it is doing a similar adjustment for where your canvas is hosted and not reporting back the error or it is expecting some kind of listener that isn't there.