Skip to content
This repository has been archived by the owner on Aug 3, 2019. It is now read-only.
Roman Kushnarenko edited this page Jun 20, 2015 · 2 revisions

Initialize callback listener:

OnLoginListener onLoginListener = new OnLoginListener() {

	@Override
	public void onLogin(String accessToken, List<Permission> acceptedPermissions, List<Permission> declinedPermissions) {
		// change the state of the button or do whatever you want
		Log.i(TAG, "Logged in");
	}
	
	@Override
	public void onCancel() {
		// user canceled the dialog
	}

	@Override
	public void onFail(String reason) {
		// failed to login
	}

	@Override
	public void onException(Throwable throwable) {
		// exception from facebook
	}

};

Login:

mSimpleFacebook.login(onLoginListener);
Clone this wiki locally