Facebook Android SDK does not open Session after login

前端 未结 2 640
别那么骄傲
别那么骄傲 2021-01-01 07:13

1) This question appears many times and the awnser is always \"you have the wrong Key Hash\".

2) Facebook documentation tells we to use this code to get our Key Has

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-01 07:44

    I figured it out:

    The following method was missing. Just added it and everything worked.

    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);
    }
    

提交回复
热议问题