- Home /
Unity FaceBook SDK Login problem.
I am using Parse.com service.
In Parse sdk for Unity document, it says to use Unity FaceBook SDK to log in to facebook.
Problem is, if I use the FB.Login method, it automatically logs into facebook with username 0, without even asking for username and password.
How do I get this Facebook login working?
I need something easy enough to understand how this works. I was unable to understand the Friend Smash example.
Hi dwjkim, have you tried the 'InteractiveConsole' scene that comes with the SD$$anonymous$$? that's the most basic example. Thanks for checking out the SD$$anonymous$$!
Thanks I've looked at that scene, but does that use password and username in the login?
When I tried with the last version of facebook sdk it automatically logged in with username 0 when FB.Init();
FB.Init() doesn't log in unless the user has already agreed to your permissions from FB.Login().
So in the InteractiveConsole scene example, it will call FB.Init() to set up Facebook, then call FB.Login() to ask the user for permissions. Later sessions should remember the user and thus you shouldn't need to call FB.Login() later on.
Answer by dwjkim · Oct 13, 2013 at 09:59 AM
Thanks I figured out. first it has to be the newest version of facebook sdk. Second login window comes up only if build is done, so testing on editor does not work with login.
Answer by SumataksoEx · Oct 07, 2013 at 04:35 PM
same problem here. The solution I use to get userid is call FB.Logout and call FB.Login to force user to login again.
Your answer
![](https://koobas.hobune.stream/wayback/20220613115307im_/https://answers.unity.com/themes/thub/images/avi.jpg)