Facebook Android application is not logged in when FB application is installed

At first I thought it was my application, but I get exactly the same problem when using any of the sample FB applications.

Take, for example, HelloFacebookSample, which gives you a login button, and after logging in, you will see your page and be able to publish status updates.

If I do not have the FB application installed on my phone, the login button gives me a web view that I can log into, and the photo appears in the application and I can make messages. However, if the FB application is installed on my phone, a dialog box appears saying that the application wants to access your public profile, etc. I click OK and ... nothing.

I found a lot of questions that seem similar, but the problem was usually using the debug key and not the release key, but I am running it from eclipse, so the debug key still works.

Any ideas?

+7
source share
3 answers

if your phone has the default Facebook application installed, or if you are trying to download the application on Google Play, you need another KeyHash. because when u developed your FB application, you registered your FB application with the key hash that is created using debug.keystore by default.

So now you need another KeyStore to generate different KeyHash. you need a signed KeyStore, which you can get using this tutorial , after generating a new keystore, generate a key hash and register your FB Application with this new key hash. that should work. to generate a new KeyHash u you can follow this link

+7
source

I would try following this guide to find out if you can get an example of the application you are creating to connect to Facebook. I also had problems connecting sample applications to Facebook. I would also like to verify that your Facebook app ID is in your manifest file.

https://developers.facebook.com/docs/howtos/androidsdk/3.0/login-with-facebook/

0
source

I found the following line that helped me in the above scenario:

mLoginFacebook.setReadPermissions(Arrays.asList("email")); 

it appears immediately after:

 mLoginFacebook = (LoginButton) rootView.findViewById(R.id.authButton); mLoginFacebook.setFragment(this); 

solved all my problems .. Greetings

0
source

All Articles