问题
I developed an application which uses we can login to facebook and the logged user details can be stored. it is working fine when we run the application on emulator , but when we run the same application on android device it does not run .It only show the loading again and again but not showing the login window.
- I used the appID which facebook provided me.
- I used the hashkey as directed in facebook development section.
Overall application (i.e. facebook login window, returning the info of user ) is working well on different emulators but on actual device not even opening the login window it's just showing loading...
回答1:
Please Update below code of your application, it will solve your problem.
public void loginAndPostToWall() {
facebook.authorize(this, PERMISSIONS, Facebook.FORCE_DIALOG_AUTH,
new LoginDialogListener());
}
来源:https://stackoverflow.com/questions/8504823/facebook-android-native-application-not-working-on-actual-device