logging in to facebook from my app works on emulator but not on device

后端 未结 2 795
醉酒成梦
醉酒成梦 2021-01-12 07:53

This is my code for logging in to facebook.

mLoginButton = (LoginButton) findViewById(R.id.login);

        // restore session if one exists
        SessionS         


        
相关标签:
2条回答
  • 2021-01-12 08:25

    You need to generate the hash key of your system and just place it by editing the existing facebook App.

    0 讨论(0)
  • 2021-01-12 08:35

    The Platform Status says that there's a problem with the SSO.

    The SSO only works if you have the facebook application installed on the android device, and what you describe fits right into all of this. On the emulator you don't have the facebook application, and so when your application tries to log the user in it uses the dialog it has in the sdk instead of using the SSO process that ships with the fb application.

    On the device how ever you said that you do have the fb app, and so the SSO kicks in and, at least currently, there's a problem with it. Try to uninstall the facebook application on the device or maybe just cancel the SSO, i.e.: How to disable Facebook single sign on for android - Facebook-android-sdk

    0 讨论(0)
提交回复
热议问题