Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook API login fails with FB app installed on phone

I am building an app, which is going to have support for facebook. I have downloaded facebook API and their sample called "Hackbook" from original Git repos. The problem is with login - if original FB app is not installed on phone, the login is going through custom dialog and everything works, but if FB app is installed, the Hackbook automatically redirect to original FB app, and then nothing happened. It's impossible to login. I have tested this on five different phones, and always was the same problem.

like image 912
virusss8 Avatar asked May 09 '12 12:05

virusss8


People also ask

Why is my Facebook app not working on my phone?

Try refreshing your browser or reopening the site; on a mobile app, close and reopen the app. You can also check to see if Facebook is offline and then restart your device, update apps, and clear your cache.

Why can'ti log into Facebook on my phone?

If you cannot log in to the Facebook app, there is a high chance that you are not giving the correct credentials for your account. To rule this out, try changing your account's password and try logging in again.

What does feature unavailable Facebook login is currently unavailable for this app mean?

If you see the message –> Feature unavailable: Facebook Login is currently unavailable for this app after clicking the Facebook login icon, it's due to Facebook's Data Use Checkup that Facebook introduced recently.


2 Answers

In my case the problem was that the user-login gets cancelled when the facebook app is installed on the device even after generating right keys.

I added following line before login and it works great.

LoginManager.getInstance().logOut();
like image 54
Akash Bisariya Avatar answered Nov 14 '22 02:11

Akash Bisariya


I had a similar problem. In my case, I had not created a hash key using my signing key. I just had the one hash key created using the debug.keystore default signing key.

As soon as i created a hash key using my app release signing key, that problem was sorted out. If you haven't already done this, create a new hash key using your signing key (for uploading on the market) and add that to your app's facebook control panel.

Hope this helps.

like image 31
Siddharth Lele Avatar answered Nov 14 '22 00:11

Siddharth Lele