Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230042

Ionic 4: failed facebook login with android when the native facebook app is installed

$
0
0

I don’t know if what I did was correct, I don’t know if what I did was correct, but I wanted to put on record.

I check the plugin files. I studied one file in particular: ConnectPlugin.java

From what I see in others forums, I did the following

I added this library

import com.facebook.login.LoginBehavior;

And any line where the following command was:

LoginManager.getInstance().logInWithReadPermissions(cordova.getActivity(), permissions);

In the line before I added this:

  // Create the request
            LoginManager.getInstance().setLoginBehavior(LoginBehavior.WEB_ONLY);
            LoginManager.getInstance().logInWithReadPermissions(cordova.getActivity(), permissions);

And worked perfectly. Now I can login in when the facebook added is installed.

I know this is a workaround.

Greettings.


Viewing all articles
Browse latest Browse all 230042

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>