你已經安裝在設備原生應用程序的Facebook?因爲com.facebook.katana - 這是來自Facebook的應用程序。它可能會發生,因爲已經通過此應用程序授權。 我該怎麼辦? 我在臉書的評論。java的代碼:
public void authorize(Activity activity, String[] permissions, int activityCode, final DialogListener listener) {
boolean singleSignOnStarted = false;
mAuthDialogListener = listener;
// 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);
}
}
我也嘗試做多登錄和發現的問題,當我有一個登錄/密碼權威性,嘗試添加新的登錄,顯示的Facebook對話,在瀏覽器自動頁面登錄秀,並立即消失。因爲使用previos數據發生登錄。當我在facebook.java: 禁用中startDialogAuth cookies。
private void startDialogAuth(Activity activity, String[] permissions) {
Bundle params = new Bundle();
if (permissions.length > 0) {
params.putString("scope", TextUtils.join(",", permissions));
}
// CookieSyncManager.createInstance(activity);
Util.clearCookies(activity);
dialog(activity, LOGIN, params, new DialogListener() {
public void onComplete(Bundle values) {
// ensure any cookies set by the dialog are saved
// CookieSyncManager.getInstance().sync();
setAccessToken(values.getString(TOKEN));
setAccessExpiresIn(values.getString(EXPIRES));
if (isSessionValid()) {
Tracks.itTrack(Tracks.Dev, "Facebook-authorize. Login Success! access_token=%s expires=%s", getAccessToken(), getAccessExpires());
mAuthDialogListener.onComplete(values);
}
else
mAuthDialogListener.onFacebookError(new FacebookError("Failed to receive access token."));
}
public void onError(DialogError error) {
Tracks.itTrack(Tracks.Dev, "Facebook-authorize. Login failed: %s", error);
mAuthDialogListener.onError(error);
}
public void onFacebookError(FacebookError error) {
Tracks.itTrack(Tracks.Dev, "Facebook-authorize. Login failed: %s", error);
mAuthDialogListener.onFacebookError(error);
}
public void onCancel() {
Tracks.itTrack(Tracks.Dev, "Facebook-authorize. Login canceled");
mAuthDialogListener.onCancel();
}
});
}
在com.facebook.android庫項目中,用log.i()替換所有的log.d()語句,即使我在設備上測試時遇到過這樣的問題,登錄屏幕消失可能是由於很多原因,由於設備日期太舊,我面臨SSLException – 2012-01-07 09:39:09