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

"Login cancelled by player" callback in facebook api for Unity IOS (only if you have facebook app in device)


I am using unity facebook api 4.3.6 for ios. Its working perfectly fine if I don't have #facebookapp in my device. Once I download it and try login, it takes me to #facebookapp and redirect again to my game with callback

FB Login callback : {"is_logged_in":false, "user_id":"", "access_token":""} Login cancelled by player

This happens only if I have facebook app downloaded! I think its some how cache issue but not sure exactly what is it. Any luck?


Solution

  • I believe this is not connected with Unity. Here is few reasons I faced

    1. You need to ask read and write permissions separately. Wait until you get read permissions than send request for write permission.

    2. Make sure your app is allowed to login ( if you have FB app installed on your device )

    3. Make sure you have your app bundle identifier added to developer.facebook.com