/** * Sign in to google account - without Google's log in button. * * @param activity the activity * @param callback the callback to receive the method's result */ public void signIn(@NonNull Activity activity, @NonNull final FacebookLoginResultCallback callback) { mCallbackManager = CallbackManager.Factory.create(); mFacebookLoginResultCallBack = callback; registerCallBackManager(activity); LoginManager.getInstance() .setLoginBehavior(LoginBehavior.NATIVE_WITH_FALLBACK) .logInWithPublishPermissions(activity, null); }
@Override protected void onAuthenticationStarted() throws AuthenticationException { LoginManager.getInstance().registerCallback(facebookCallbackManager, generalFacebookCallback); LoginManager.getInstance().setLoginBehavior(LoginBehavior.SUPPRESS_SSO); LoginManager.getInstance().logInWithReadPermissions( getFragment(), authMode.getPermissions() ); }
public void setLoginBehavior(LoginBehavior loginBehavior) { this.loginBehavior = loginBehavior; }
public LoginBehavior getLoginBehavior() { return loginBehavior; }
/** * @param loginBehavior * The loginBehavior to set. */ public Builder setLoginBehavior(LoginBehavior loginBehavior) { mLoginBehavior = loginBehavior; return this; }
/** * Sets the login behavior during authorization. If null is specified, the default * ({@link com.facebook.login.LoginBehavior LoginBehavior.NATIVE_WITH_FALLBACK} * will be used. * * @param loginBehavior The {@link com.facebook.login.LoginBehavior LoginBehavior} that * specifies what behaviors should be attempted during * authorization. */ public void setLoginBehavior(LoginBehavior loginBehavior) { properties.setLoginBehavior(loginBehavior); }
/** * Gets the login behavior during authorization. If null is returned, the default * ({@link com.facebook.login.LoginBehavior LoginBehavior.NATIVE_WITH_FALLBACK} * will be used. * * @return loginBehavior The {@link com.facebook.login.LoginBehavior LoginBehavior} that * specifies what behaviors should be attempted during * authorization. */ public LoginBehavior getLoginBehavior() { return properties.getLoginBehavior(); }
/** * Init Google log in button. * * @param activity the activity */ private void initLoginButton(Activity activity, LoginButton loginButton) { loginButton.setReadPermissions(getFacebookReadPermissions()); loginButton.setLoginBehavior(LoginBehavior.NATIVE_WITH_FALLBACK); }
/** * Get session login behavior * * @return */ LoginBehavior getLoginBehavior() { return mLoginBehavior; }
/** * Sets the login behavior during authorization. If null is specified, the default * ({@link com.facebook.login.LoginBehavior LoginBehavior.SSO_WITH_FALLBACK} * will be used. * * @param loginBehavior The {@link com.facebook.login.LoginBehavior LoginBehavior} that * specifies what behaviors should be attempted during * authorization. */ public void setLoginBehavior(LoginBehavior loginBehavior) { properties.setLoginBehavior(loginBehavior); }
/** * Gets the login behavior during authorization. If null is returned, the default * ({@link com.facebook.login.LoginBehavior LoginBehavior.SSO_WITH_FALLBACK} * will be used. * * @return loginBehavior The {@link com.facebook.login.LoginBehavior LoginBehavior} that * specifies what behaviors should be attempted during * authorization. */ public LoginBehavior getLoginBehavior() { return properties.getLoginBehavior(); }