开发者

FBdialog dismisses on Several Android Devices

开发者 https://www.devze.com 2023-04-02 04:17 出处:网络
I am developing and android application on 2.2 version, it has facebook implementation, which runs on My Devic开发者_如何学JAVAe(LG optimus) and my emulator with all android version but when i run thi

I am developing and android application on 2.2 version, it has facebook implementation, which runs on My Devic开发者_如何学JAVAe(LG optimus) and my emulator with all android version but when i run this on Sony Xperia and on Motorola Droid X2, then the Facebook FBdialog dismissed and not showing the facebook login screen. I am using Facebook-sdk from git hub.

Any Solution??

Thanks.


Is there any facebook application in Sony Xperia and Motorola Droid X2? Then open Facebook.java and find this code and comment just like this:

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

hope this helpful to you. because when there facebook application installed it's activate single sign on with facebook application and your application need to register in your app in facebook. See here for more clear information. http://developers.facebook.com/docs/guides/mobile/android/

0

精彩评论

暂无评论...
验证码 换一张
取 消