它不是模擬器的問題。但是它的一個問題,因爲你已經在該模擬器中安裝原生的facebookapp。
我得到同樣的問題,現在我已經解決了它。
你需要做的是:
剛去的Facebook SDK項目。然後去Facebook.java
現在在這裏,你會得到一個方法,如授權:
public void authorize(Activity activity, String[] permissions,
int activityCode, final DialogListener listener) {
boolean singleSignOnStarted = false;
mAuthDialogListener = listener;
THIS CODE IS EDITED BY SHREYASH FOR NOT ALLOW THE DEFAULT FACEBOOK APP
// Prefer single sign-on, where available.
if (activityCode >= 0) {
singleSignOnStarted = startSingleSignOn(activity, mAppId,
permissions, activityCode);
}
// Otherwise fall back to traditional dialog.
if (!singleSignOnStarted) {
startDialogAuth(activity, permissions);
}
}
只需更換上面下面這樣一個:
public void authorize(Activity activity, String[] permissions,
int activityCode, final DialogListener listener) {
boolean singleSignOnStarted = false;
mAuthDialogListener = listener;
// THIS CODE IS EDITED FOR NOT ALLOW THE DEFAULT FACEBOOK APP
// // Prefer single sign-on, where available.
// if (activityCode >= 0) {
// singleSignOnStarted = startSingleSignOn(activity, mAppId,
// permissions, activityCode);
// }
// // Otherwise fall back to traditional dialog.
// if (!singleSignOnStarted) {
startDialogAuth(activity, permissions);
// }
}
這將切切實實解決您的問題。 如果沒有,然後讓我知道。
享受。
:)