java如何避免Android facebook SDK 4.0.1中的alreadyauthorized页面
我只是创建了一个新的应用程序,用最新的Android SDK(v4.0.1)登录到Facebook,我总是会得到一个带有
You already authorized App.
以下是我的应用程序中的主要活动中的OnCreate:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FacebookSdk.sdkInitialize(getApplicationContext());
setContentView(R.layout.activity_main);
if (AccessToken.getCurrentAccessToken() != null ||
Profile.getCurrentProfile() != null) {
// User should be logged, but process never go in this condition
}
perm.add("email");
perm.add("user_friends");
perm.add("user_likes");
perm.add("public_profile");
mCallbackManager = CallbackManager.Factory.create();
mLoginManager = LoginManager.getInstance();
mLoginManager.registerCallback(mCallbackManager, this);
mLoginManager.logInWithReadPermissions(this, perm);
如何检查此用户是否已登录/授权此应用程序
已解决:此页面仅显示在emulator中,而不显示在设备上
共 (0) 个答案