Search code examples
androidfacebookunity-game-enginefacebook-unity-sdk

Facebook SDK for Unity on Android - Trouble about callback from FB.Login


I'm having some problem about login in facebook-unity-sdk on android device. When I login and get callback, them return this

FBResult.Text

{"is_logged_in":false,"user_id":"","access_token":""}

FBResult.Error

null

and FB.IsLoggedIn is null everytime after login completed

I'm using last version of Facebook SDK (4.2.1) and Unity 4.2

On Debug Log

Send to Unity OnLoginCompleted({"cancelled":true})

Solution

  • My problem has resolved now. This problem is about Multi-Plugin on project. Now (I think), Facebook SDK can't use with other plugin that want main activity for them on android. Export android project and recheck AndroidManifest.xml and maintain them for right things, It should have FBUnityActivity for singletask that many plugin override them so facebook can't get session on game launch. Hope for next version this SDK can use with another plugin. Thank you everyone for advise :)