SSL error while logging in to Facebook on Android

I am implementing Facebook Login in my application but not working on Api 2.3.6

I tested the application in the emulator and its work Fine upto Api 23

It also works on a device with API 21, but not in version 2.3.6

SSL related error

Bcoz I read in SO the answer that

  • on the Api 2.3.6 level, all connections and authorizations are processed only using HTTPS, while on the Api levels above 2.3.6 it is not HTTPS, which performs each task

  • I also noticed that whenever I try to call any URL starting with HTTPS it does not give the final result, but silently stops, as was the case with the Googles Api direction.

Below is the StackTrace that I get in version 2.3.6:

V/webkit: LoadListener.handleSslErrorRequest(): url:https://m.facebook.com/v2.4/dialog/oauth? return_scopes=true&response_type=token%2Csigned_request&redirect_uri =fbconnect%3A%2F%2Fsuccess&display=touch&sdk=android- 4.5.1&e2e=%7B%22init%22%1232%7D&client_id=1234&default_audience=friends primary error: 3 certificate: Issued to: CN=*.facebook.com,O=Facebook\, Inc.,L=Menlo Park,ST=CA,C=US; Issued by: 1.2.840.113549.1.9.1=#1223,CN=Cyberoam SSL CA_C016700030,OU=Cyberoam Certificate Authority,O=Elitecore,L=Ahmedabad,ST=Gujarat,C=IN; I/System.out: close [socket][/0.0.0.0:52994] I/webkit/webview: WebView.stopLoading() D/webkit/webview: WebView.stopLoading(): webcorethread is initialized I/webkit/webview: WebView.stopLoading() D/webkit/webview: WebView.stopLoading(): webcorethread is initialized W/System.err: at com.facebook.login.LoginManager.onActivityResult(LoginManager.java:173) W/System.err: at com.facebook.login.LoginManager$1.onActivityResult(LoginManager.java:139) W/System.err: at com.facebook.internal.CallbackManagerImpl.onActivityResult (CallbackManagerImpl.java:82) W/System.err: at com.hogo.integrationapp.FirstActivity.onActivityResult (FirstActivity.java:179) W/System.err: at android.app.Activity.dispatchActivityResult(Activity.java:3975) W/System.err: at android.app.ActivityThread.deliverResults(ActivityThread.java:2629) W/System.err: at android.app.ActivityThread.handleSendResult(ActivityThread.java:2675) W/System.err: at android.app.ActivityThread.access$2000(ActivityThread.java:156) W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1030) W/System.err: at android.os.Handler.dispatchMessage(Handler.java:130) W/System.err: at android.os.Looper.loop(SourceFile:351) W/System.err: at android.app.ActivityThread.main(ActivityThread.java:3821) W/System.err: at java.lang.reflect.Method.invokeNative(Native Method) W/System.err: at java.lang.reflect.Method.invoke(Method.java:538) W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run\ (ZygoteInit.java:969) W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:727) W/System.err: at dalvik.system.NativeStart.main(Native Method) 

Is there an easy way to solve it?

Also I want to understand why this is happening?

I am using Facebook Sdk 4.5.1

For API 4.4.2: An error occurred due to the opening of the File Transfer application on my device when I closed it.

Thanks at Advance ...

+5
source share

Source: https://habr.com/ru/post/1244092/


All Articles