开发者

Android FB Connect

I am trying to integrate the official FB SDK for android. below is the basic code

public class FbTestActivity extends Activity {
    Facebook facebook = new Facebook("112374492201730");

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        facebook.authorize(this, new String[] { "email", "read_stream" },

        new DialogListener() {

            public void onComplete(Bundle values) {
            }

            public void onFacebookError(FacebookError error) {
            }

            public void onError(DialogError e) {
            }

            public void onCancel() {

            }
        });
    }

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

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

When i open the app the Log开发者_StackOverflow社区in or (if looged in) Permission dialog never shows up. Some dialog opens for a few mili secs and closes down.


The problem is the SSO (Single Sign On) feature of the login.

Following link will help you.

facebook login dialog disappears soon after loading

http://ukgupta.blogspot.com/2011/07/facebook-implementation-into-android.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜