获取意外的CallbackManager,在facebook集成android

请帮助我,我得到意外的CallbackManager,请使用提供的工厂。 在Facebook Android

logcat的:

Process: com.thepetmet, PID: 27675 Unexpected CallbackManager, please use the provided Factory. at com.facebook.login.LoginManager.registerCallback(LoginManager.java:128) at com.facebook.login.widget.LoginButton.registerCallback(LoginButton.java:445) at com.thepetmet.Login.LoginActivity.FacebookLogin(LoginActivity.java:244) at com.thepetmet.Login.LoginActivity.onClick(LoginActivity.java:236) at android.view.View.performClick(View.java:4463) at android.view.View$PerformClick.run(View.java:18770) at android.os.Handler.handleCallback(Handler.java:808) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:5292) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) at dalvik.system.NativeStart.main(Native Method) 

你必须调用它: CallbackManager callbackManager = CallbackManager.Factory.create(); 然后才能使用callbackManager

有同样的问题,并意识到我的callbackManager是null