开发者

facebook authentication dialog disappearing instantly

I am using the latest facebook android SDK but when I call the mFaceboo.authorize(...) method the dialog box is not appearing instead a full screen page is showing up for a second and instantly disappears.

I noticed that i have recently updated the official facebook client app in my device. When I have removed the updates from the facebook client the Authentication dialog is working fine.

But the problem is that I can't force users of my app not to update their facebook client app. Is anyone facing same problem or knows the solution please help.

Following is the snippet that I am using.

   mFacebook.authorize(MyProfileScreen.this, PERMISSIONS, new DialogListener() {


        @Override
        public void onComplete(Bundle values) {

            /*
             * Here we'll the token so we can store it for the further use.
             */
            Log.v(TAG, "Facebook Login Success! ");

            launchProfileScreen();
        }

        @Override
        public void onFacebookError(FacebookError e) {
            // TODO Auto-g开发者_如何学JAVAenerated method stub
            Log.v(TAG, "onFacebookError"+e.getMessage());
        }

        @Override
        public void onError(DialogError e) {
            // TODO Auto-generated method stub
            Log.v(TAG, "onError"+e.getMessage());
        }

        @Override
        public void onCancel() {
            // TODO Auto-generated method stub
            Log.v(TAG, "onCancel");
        }
    });

Also calling

 @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    mFacebook.authorizeCallback(requestCode, resultCode, data);
}


See this SO question: android facebook share problem on device that may help.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜