Android Facebook Authorization - Can Not Log in When Official Facebook App Is Installed

Android Facebook authorization - can not log in when official Facebook app is installed

Please update the below code of your application. It will solve your problem.

public void loginAndPostToWall() {
facebook.authorize(this, PERMISSIONS, Facebook.FORCE_DIALOG_AUTH,
new LoginDialogListener());
}

Facebook login fails with facebook app installed

Have you setup your debug key hash and full class name on Facebook's app settings dashbaord? see steps 5 and 6 in the Getting Started with the Facebook SDK for Android doc.

Facebook API login fails with FB app installed on phone

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.

Android facebook login not working with installed Facebook app

Check out the bottom of step 4: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/

If you have not entered your app key hash properly, Facebook login via the WebView popup (if the app is not installed) will still work, but login via the native Facebook app won't.

You should see this exception in LogCat:

com.facebook.http.protocol.ApiException: remote_app_id does not match stored id

The Facebook SDK prints its exceptions so check there anyway if there are other problems.

App misconfigured - Could not log in to Facebook when official Facebook app is installed

If you are trying to upload your app on Google Play or if there is the default Facebook App is installed in your phone, then you need a different KeyHash. Because, when you developed your Facebook app you have registered your Facebook app with a key hash which is created by using the default debug.keystore.

So, now you need a different KeyStore to generate the different KeyHash. You need a signed KeyStore, which you get by the help of this tutorial. After generating a new keystore, generate a key hash and register your Facebook app with this new key hash. This should work.

EDITED:

You should check your .apk key hash to be sure you have registered with this key hash. You should check out these: Key hash for Android-Facebook app and App is misconfigured for Facebook login - not returning the logcat, after setting ENABLE_LOG to true in util.java.

Facebook login doesn't work if app is downloaded from google play

Go to your Google Play Console > Your Project > Release Management > App Signing > Copy SHA-1 certificate fingerprint and paste it in your facebook console in the SHA-1 field.

Or follow this

https://stackoverflow.com/a/17770788/5773044

SSO (Singe Sign-On) not working when Facebook app is installed on device

I had a similar logcat output and found out that it was related to incorrectness in the FB 3.5 source code. As described above it´s on line 821 in AuthorizationClient.java. There should be getIntExtra instead of getStringExtra.
Download the source from github and change

intent.getStringExtra(NativeProtocol.EXTRA_PROTOCOL_VERSION));

to

""+intent.getIntExtra(NativeProtocol.EXTRA_PROTOCOL_VERSION, 0));

Android Facebook SSO does not work when fb is already installed on device

There's a problem with the android SSO, and it has been acknowledged by facebook as you can see in the Platform Status page.

If the facebook application is present on the device then the SSO is used and it won't work until facebook fixes the problem.
There are some other threads here about this problem, for example: logging in to facebook from my app works on emulator but not on device

Ti.Facebook doesn't open authorize with FB app installed

This is my second answer on this question. I believe that my original answer offers some value to the conversation and that is why I am leaving it, but it still did not consistently solve the problem of the facebook authorization not working.

The consistent solution turned out to be modifying the official Ti.Facebook module. I will submit a pull request for this change (1 line), but for now, you can get the working module here:

Source

Pre-built

This consistently allows users to authorize by explicitly setting the login behavior to use the browser, rather than the native facebook app through fast app-switching. This is actually the intent of Facebook's developers.

I was unable to determine what is causing it to fizzle when trying to use the native app to login - it should try the next option, which is the browser - but this works, and doesn't require a TiFacebookButton either.

I hope it helps someone else!



Related Topics



Leave a reply



Submit