mfacebook_Callback_Manager = CallbackManager.Factory.create();
Collection<String> permissions = Arrays.asList("public_profile,email");
LoginManager.getInstance().logInWithReadPermissions(MainActivity.this,
permissions);
LoginManager.getInstance().registerCallback(mfacebook_Callback_Manager,
new FacebookCallback<LoginResult>() {.......}
Error occurs in callback of loginmanager.
Stack Trace:
07-12 21:25:10.712 2107-2107/com.factory.fbsample.dev W/System.err: at com.facebook.login.LoginManager.onActivityResult(LoginManager.java:191 07-12 21:25:10.712 217-2107/com.factory.fbsample.dev W/System.err: at com.facebook.login.LoginManager$1.onActivityResult(LoginManager.java:160 07-12 21:25:10.712 217-2107/com.factory.fbsample.dev W/System.err: at com.facebook.internal.CallbackManagerImpl.onActivityResult(CallbackManagerImpl.jva:82 07-12 21:25:10.712 217-210/com.factory.fbsample.dev W/System.err: at com.factory.fbsample.activities.LoginActivity.onActivityResult(LogiActivty.java:272 07-12 21:25:10.712 217-210/th.co.hond.hconnect.dev W/System.err: at android.app.Activity.dispatchActivityResult(Activity.java:5322 07-12 21:5:10.712 2107-2107/com.factory.fbsample.dev W/System.err: at android.app.ActivityThread.deliverResults(ActivityThread.java:3363 07-12 21:5:10.712 2107-2107/com.factory.fbsample.dev W/System.err: at android.app.ActivityThread.handleSendResult(ActivityThread.java:3410 07-12 21:5:10.712 2107-2107/com.factory.fbsample.dev W/System.err: at android.app.ActivityThread.access$1100(ActivityThread.java:141 07-12 2125:10.712 2107-2107/com.factory.fbsample.dev W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:130 07-12 215:10.712 2107-2107/com.factory.fbsample.dev W/System.err: at android.os.Handler.dispatchMessage(Handler.java:99) 07-12 215:10.720 2107-2107/com.factory.fbsample.dev W/System.err: at android.os.Looper.loop(Looper.java:137) 07-12 215:10.720 2107-2107/com.factory.fbsample.dev W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5103) 07-12 215:10.720 2107-2107/com.factory.fbsample.dev W/System.err: at java.lang.reflect.Method.invokeNative(Native Method) 07-12 215:10.720 2107-2107/com.factory.fbsample.dev W/System.err: at java.lang.reflect.Method.invoke(Method.java:525) 07-12 215:10.720 2107-2107/com.factory.fbsample.dev W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteIn.java:737 07-12 215:10.720 107-2107/com.factory.fbsample.dev W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 07-12 21:25:10.720 2107-2107/com.factory.fbsample.dev W/System.err: at dalvik.system.NativeStart.main(Native Method)
you can use it as
or you can follow this link as well facebook login
You should post the full error (including a stack trace) as part of your question.
Also, your permissions are constructed incorrectly. You should do this instead:
This is documented here and here.