Logcat
我有这段代码
FacebookSdk.sdkInitialize(getApplicationContext());
setContentView(R.layout.activity_social);
callbackManager = CallbackManager.Factory.create();
info = (TextView)findViewById(R.id.info);
loginButton = (LoginButton)findViewById(R.id.login_button);
loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(LoginResult loginResult) {
info.setText(
"User ID: "
+ loginResult.getAccessToken().getUserId()
+ "\n" +
"Auth Token: "
+ loginResult.getAccessToken().getToken()
);
}
});
}
运行它时应用程序崩溃。我不知道为什么这次撞车,请帮帮我!感谢