简体   繁体   中英

Unity Facebook sdk 4.3.6

I am having a issue with facebook login. I am using facebook sdk 4.3.6 and unity3d 4.3.0/4.3.1 .

when I hit login button Facebook permission windows open and after pressing ok nothing happens and following message is printed in logs

" sending to Unity OnLoginComplete({"cancelled":true,"key_hash":"asdasd"}) "

FB.Login("email,publish_actions", LoginCallback);

and in

void LoginCallback(FBResult result)                                                        
    {                                                                                          

        login = result.Text; // output  login=false, userid="", access_Token=""

    } 

Not sure what the above answer is...Why does JSON have to do with anything?

I am having the same problem...was using Facebook SDK 4.3.4 and was having the same problem. I saw there was a new one up 4.3.6 and tried it...same problem.

I check LOGCAT and saw the same line: sending to Unity OnLoginComplete({"cancelled":true,"key_hash":"4EbLC........0uFU1A="})

Which is NOT my has from my UNITY Facebook settings...I have no idea where it is getting this HASH from.

I am wondering if the "cancelled":true result is a result from the Facebook Dialog to allow permissions ..although I did not click CANCEL

I am going to try the only thing I haven't tried yet and that was a post from someone to get the latest OPENSLL and regen the keys...


SOLVED: OK Here is what I did to get it working....

I added that Hash that I got from the LOGCAT to the Facebook Develop App Settings on develop.facebook.com/apps

Now it logs in me in...

I just don't know where that Hash is coming from...I also have the hash that was generated from Unity in there as well.

Ryan

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM