When I use the FB.Login function in the editor, it opens the user token window, but it doesn’t open anything on the build version.
Here’s my code:
void Start() {
StartFacebook();
}
public void StartFacebook() {
FB.Init(InitFunc);
}
private void InitFunc() {
enabled = true;
Debug.Log("Facebook SDK Loaded");
}
public void LoginFacebook() {
FB.Login("user_photos, publish_actions", LoginCallback);
}
private void LoginCallback(FBResult result) {
Debug.Log("ID: " + FB.UserId);
}
Yes, I hosted it on Dropbox and I am running it on Facebook canvas. The game loads properly, but the login button doesn't do anything.
– VitamYou might have to check the logs and see what is going wrong. Make a development build, enable script debugging. Then have each function in the FB init, callback, login, callback chain output a message. Check the build logs and see where the fault is occurring. I recently had an issue where the FB callback fails to occur when changing scenes during the login process.
– Kiwasi