我正在使用 Facebook Android sdk3.0。用户通过 Facebook 成功登录后,我想做一些事情。我应该在内部实现它onActivityResult
还是实现它的onComplete
功能Session.StatusCallback
?
其实这两者有什么区别吗?我可以假设 Session.StatusCallback onComplete 总是在之后调用onActivityResult
吗?
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);
// Do Something Here?
}
private class SessionStatusCallback implements Session.StatusCallback {
@Override
public void call(Session session, SessionState state, Exception exception) {
if (session.isOpened()) {
// Or Do Something Here?
}
}
}