0
這是我的代碼。該代碼在ImageView
的onClick(View view)
中執行。當我點擊它時,它會將我發送到Facebook本地應用程序。然後我登錄,但會話返回關閉。我究竟做錯了什麼?簡單Facebook登錄
Session.openActiveSession(getActivity(), true, new Session.StatusCallback() {
@Override
public void call(Session session, SessionState state, Exception exception) {
if(session.isOpened()) {
Toast.makeText(getActivity(),"Logged in Successfully",Toast.LENGTH_SHORT).show();
}
}
});