Downloaded Facebook app replaces my App's facebook login page

无人久伴 提交于 2020-01-21 09:11:19

问题


i am about to complete my application but i am facing few problems with facebook and twitter.

1). I have downloaded and installed facebook application in my device but now when my app redirects on facebook as per it's flow, it open ups that installed facebook app instead of my FB official SDK login screen. Any solution to this?

2). I am using Fb Official SDK and twitter4j 2.1.7 which was working perfectly, but after upgrading my device to Android 2.1update1.. Both Fb and Twitter has stopped working with Device whereas works fine in emulator of the same update or later.

Please do help in these regard asap.

Thanks in advance.


回答1:


in the 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);
    }
}

change it to

public void authorize(Activity activity, String[] permissions,
        int activityCode, final DialogListener listener) {

    boolean singleSignOnStarted = false;

    mAuthDialogListener = listener;


        startDialogAuth(activity, permissions);

}


来源:https://stackoverflow.com/questions/4814699/downloaded-facebook-app-replaces-my-apps-facebook-login-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!