In my app I'm using facebook SDK to perform a login and register methods.
It's Okay when I have the general FaceBook application or using normal web-browser on my device.
But when I have FaceBook Lite on my device and I don't have the general FaceBook application, when I try to login/sign up using the facebook-sdk the app just close without any log/messages, So I can't know why this issue happened.
How can I fix that issue? - Can I skip FaceBook Lite app and use browser instead?
Update:
Here is a video if I have normal facebook app, no problems.
Here is a video if I have the face book app lite on my device, which make it crash.
My code snippet:
LoginManager.getInstance()
.logInWithReadPermissions(getActivity(), Arrays.asList("public_profile"));
LoginManager.getInstance()
.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(final LoginResult loginResult) {
Log.i("MainActivity", "@@@onSuccess");
GraphRequest request = GraphRequest
.newMeRequest(loginResult.getAccessToken(),
(object, response) -> {
Log.i("MainActivity",
"@@@response: " + response.toString());
try {
///
} catch (JSONException e) {
////
}
});
}
@Override
public void onCancel() {
Log.i("MainActivity", "@@@onCancel");
}
@Override
public void onError(FacebookException error) {
Log.i("MainActivity", "@@@onError: " + error.getMessage());
}
});
You know FB's motto - move fast and break things. SDK integration with native apps is one of the things that sometimes breaks.
You can force Facebook SDK to use web for login:
LoginManager.getInstance().setLoginBehavior(LoginBehavior.WEB_ONLY)