Package 

Class LoginButton

  • All Implemented Interfaces:
    android.graphics.drawable.Drawable.Callback , android.view.KeyEvent.Callback , android.view.ViewTreeObserver.OnPreDrawListener , android.view.accessibility.AccessibilityEventSource

    
    public class LoginButton
    extends FacebookButtonBase
                        

    A Log In/Log Out button that maintains login state and logs in/out for the app.

    This control requires the app ID to be specified in the AndroidManifest.xml.

    • Method Summary

      Modifier and Type Method Description
      final String getLoginText()
      final Unit setLoginText(String loginText)
      final String getLogoutText()
      final Unit setLogoutText(String logoutText)
      final ToolTipPopup.Style getToolTipStyle() Style (background) of the Tool Tip popup.
      final Unit setToolTipStyle(ToolTipPopup.Style toolTipStyle) Style (background) of the Tool Tip popup.
      final LoginButton.ToolTipMode getToolTipMode() The mode of the Tool Tip popup.
      final Unit setToolTipMode(LoginButton.ToolTipMode toolTipMode) The mode of the Tool Tip popup.
      final Long getToolTipDisplayTime() The amount of time (in milliseconds) that the tool tip will be shown to the user.
      final Unit setToolTipDisplayTime(Long toolTipDisplayTime) The amount of time (in milliseconds) that the tool tip will be shown to the user.
      final String getLoggerID() The logger ID associated with the LoginButton
      final CallbackManager getCallbackManager() The callback manager registered to the login button.
      final Unit setCallbackManager(CallbackManager callbackManager)
      final DefaultAudience getDefaultAudience()
      final Unit setDefaultAudience(DefaultAudience defaultAudience)
      final LoginBehavior getLoginBehavior()
      final Unit setLoginBehavior(LoginBehavior loginBehavior)
      final LoginTargetApp getLoginTargetApp()
      final Unit setLoginTargetApp(LoginTargetApp loginTargetApp)
      final String getAuthType()
      final Unit setAuthType(String authType)
      final String getMessengerPageId()
      final Unit setMessengerPageId(String messengerPageId)
      final Boolean getResetMessengerState()
      final Unit setResetMessengerState(Boolean resetMessengerState)
      final Boolean getShouldSkipAccountDeduplication()
      final List<String> getPermissions()
      final Unit setPermissions(List<String> permissions)
      final ActivityResultRegistryOwner getAndroidxActivityResultRegistryOwner()
      final Fragment getFragment()
      final Fragment getNativeFragment()
      Integer getRequestCode()
      final Unit setReadPermissions(List<String> permissions) Set the permissions to use when the user logs in.
      final Unit setReadPermissions(String permissions) Set the permissions to use when the user logs in.
      final Unit setPermissions(String permissions) Set the permissions to use when the user logs in.
      final Unit setPublishPermissions(List<String> permissions) Set the permissions to use when the user logs in.
      final Unit setPublishPermissions(String permissions) Set the permissions to use when the user logs in.
      final Unit clearPermissions() Clears the permissions currently associated with this LoginButton.
      final Unit dismissToolTip() Dismisses the Tooltip if it is currently visible
      final Unit registerCallback(CallbackManager callbackManager, FacebookCallback<LoginResult> callback) Registers a login callback to the given callback manager.
      final Unit unregisterCallback(CallbackManager callbackManager) Unregisters a login callback to the given callback manager.
      • Methods inherited from class android.widget.TextView

        addChildrenForAccessibility, addFocusables, addFocusables, addKeyboardNavigationClusters, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, addTouchables, animate, announceForAccessibility, autofill, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, cancelDragAndDrop, cancelPendingInputEvents, checkInputConnectionProxy, clearAnimation, clearFocus, clearViewTranslationCallback, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeSystemWindowInsets, computeVerticalScrollOffset, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchCreateViewTranslationRequest, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPointerCaptureChanged, dispatchPopulateAccessibilityEvent, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchScrollCaptureSearch, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, gatherTransparentRegion, generateDisplayHash, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBottom, getBottomFadingEdgeStrength, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getContextMenuInfo, getDefaultFocusHighlightEnabled, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getImportantForContentCapture, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getOverlay, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getReceiveContentMimeTypes, getResources, getRevealOnFocusHint, getRight, getRootSurfaceControl, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollCaptureHint, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTopFadingEdgeStrength, getTouchDelegate, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTranslationResponse, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasPointerCapture, hasTransientState, hasWindowFocus, invalidate, invalidate, invalidate, invalidateOutline, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPivotSet, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollContainer, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCreateVirtualViewTranslationRequests, onDisplayHint, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyLongPress, onOverScrolled, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onScrollCaptureSearch, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onVirtualViewTranslationResponses, onVisibilityAggregated, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performReceiveContent, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requestUnbufferedDispatch, requireViewById, resetPivot, restoreDefaultFocus, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAllowClickWhenDisabled, setAlpha, setAnimation, setAnimationMatrix, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundGravity, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnReceiveContentListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPivotX, setPivotY, setPointerIcon, setPressed, setRenderEffect, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollBarSize, setScrollBarStyle, setScrollCaptureCallback, setScrollCaptureHint, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setScrollbarFadingEnabled, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setViewTranslationCallback, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setWindowInsetsAnimationCallback, setX, setY, setZ, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDraw
      • Methods inherited from class android.widget.Button

        addExtraDataToAccessibilityNodeInfo, addTextChangedListener, append, append, autofill, beginBatchEdit, bringPointIntoView, cancelLongPress, clearComposingText, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollRange, debug, didTouchFocusSelect, drawableHotspotChanged, drawableStateChanged, endBatchEdit, extractText, findViewsWithText, getAutoLinkMask, getAutoSizeMaxTextSize, getAutoSizeMinTextSize, getAutoSizeStepGranularity, getAutoSizeTextAvailableSizes, getAutoSizeTextType, getAutofillType, getAutofillValue, getBaseline, getBottomPaddingOffset, getBreakStrategy, getCompoundDrawablePadding, getCompoundDrawableTintBlendMode, getCompoundDrawableTintList, getCompoundDrawableTintMode, getCompoundDrawables, getCompoundDrawablesRelative, getCompoundPaddingBottom, getCompoundPaddingEnd, getCompoundPaddingStart, getCompoundPaddingTop, getCurrentHintTextColor, getCurrentTextColor, getCustomInsertionActionModeCallback, getCustomSelectionActionModeCallback, getDefaultEditable, getDefaultMovementMethod, getEditableText, getEllipsize, getError, getExtendedPaddingBottom, getExtendedPaddingTop, getFilters, getFirstBaselineToTopHeight, getFocusedRect, getFontFeatureSettings, getFontVariationSettings, getFreezesText, getGravity, getHighlightColor, getHint, getHintTextColors, getHyphenationFrequency, getImeActionId, getImeActionLabel, getImeHintLocales, getImeOptions, getIncludeFontPadding, getInputExtras, getInputType, getJustificationMode, getKeyListener, getLastBaselineToBottomHeight, getLayout, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLetterSpacing, getLineBounds, getLineCount, getLineHeight, getLineSpacingExtra, getLineSpacingMultiplier, getLinkTextColors, getLinksClickable, getMarqueeRepeatLimit, getMaxEms, getMaxHeight, getMaxLines, getMaxWidth, getMinEms, getMinHeight, getMinLines, getMinWidth, getMovementMethod, getOffsetForPosition, getPaint, getPaintFlags, getPrivateImeOptions, getRightFadingEdgeStrength, getRightPaddingOffset, getSelectionEnd, getSelectionStart, getShadowColor, getShadowDx, getShadowDy, getShadowRadius, getShowSoftInputOnFocus, getText, getTextClassifier, getTextColors, getTextCursorDrawable, getTextDirectionHeuristic, getTextLocale, getTextLocales, getTextMetricsParams, getTextScaleX, getTextSelectHandle, getTextSelectHandleLeft, getTextSelectHandleRight, getTextSize, getTextSizeUnit, getTopPaddingOffset, getTotalPaddingBottom, getTotalPaddingEnd, getTotalPaddingLeft, getTotalPaddingRight, getTotalPaddingStart, getTotalPaddingTop, getTransformationMethod, getTypeface, getUrls, hasOverlappingRendering, hasSelection, invalidateDrawable, isAllCaps, isCursorVisible, isElegantTextHeight, isFallbackLineSpacing, isHorizontallyScrollable, isInputMethodTarget, isPaddingOffsetRequired, isSingleLine, isSuggestionsEnabled, isTextSelectable, jumpDrawablesToCurrentState, length, moveCursorToVisibleOffset, onBeginBatchEdit, onCheckIsTextEditor, onCommitCompletion, onCommitCorrection, onConfigurationChanged, onCreateContextMenu, onCreateDrawableState, onCreateInputConnection, onCreateViewTranslationRequest, onDragEvent, onEditorAction, onEndBatchEdit, onFocusChanged, onGenericMotionEvent, onKeyDown, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPreDraw, onPrivateIMECommand, onReceiveContent, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSelectionChanged, onTextChanged, onTextContextMenuItem, onTouchEvent, onTrackballEvent, onViewTranslationResponse, onWindowFocusChanged, performLongClick, removeTextChangedListener, sendAccessibilityEventUnchecked, setAllCaps, setAutoLinkMask, setAutoSizeTextTypeUniformWithConfiguration, setAutoSizeTextTypeUniformWithPresetSizes, setAutoSizeTextTypeWithDefaults, setBreakStrategy, setCompoundDrawablePadding, setCompoundDrawableTintBlendMode, setCompoundDrawableTintList, setCompoundDrawableTintMode, setCompoundDrawables, setCompoundDrawablesRelative, setCompoundDrawablesRelativeWithIntrinsicBounds, setCompoundDrawablesRelativeWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCursorVisible, setCustomInsertionActionModeCallback, setCustomSelectionActionModeCallback, setEditableFactory, setElegantTextHeight, setEllipsize, setEms, setEnabled, setError, setError, setExtractedText, setFallbackLineSpacing, setFilters, setFirstBaselineToTopHeight, setFontFeatureSettings, setFontVariationSettings, setFrame, setFreezesText, setGravity, setHeight, setHighlightColor, setHint, setHint, setHintTextColor, setHintTextColor, setHorizontallyScrolling, setHyphenationFrequency, setImeActionLabel, setImeHintLocales, setImeOptions, setIncludeFontPadding, setInputExtras, setInputType, setJustificationMode, setKeyListener, setLastBaselineToBottomHeight, setLetterSpacing, setLineHeight, setLineSpacing, setLines, setLinkTextColor, setLinkTextColor, setLinksClickable, setMarqueeRepeatLimit, setMaxEms, setMaxHeight, setMaxLines, setMaxWidth, setMinEms, setMinHeight, setMinLines, setMinWidth, setMovementMethod, setOnEditorActionListener, setPadding, setPaddingRelative, setPaintFlags, setPrivateImeOptions, setRawInputType, setScroller, setSelectAllOnFocus, setSelected, setShadowLayer, setShowSoftInputOnFocus, setSingleLine, setSingleLine, setSpannableFactory, setText, setText, setText, setText, setText, setTextAppearance, setTextAppearance, setTextClassifier, setTextColor, setTextColor, setTextCursorDrawable, setTextCursorDrawable, setTextIsSelectable, setTextKeepState, setTextKeepState, setTextLocale, setTextLocales, setTextMetricsParams, setTextScaleX, setTextSelectHandle, setTextSelectHandle, setTextSelectHandleLeft, setTextSelectHandleLeft, setTextSelectHandleRight, setTextSelectHandleRight, setTextSize, setTextSize, setTransformationMethod, setTypeface, setTypeface, setWidth, showContextMenu, showContextMenu, verifyDrawable
      • Methods inherited from class com.facebook.FacebookButtonBase

        getAccessibilityClassName, onResolvePointerIcon
      • Methods inherited from class com.facebook.login.widget.LoginButton

        getCompoundPaddingLeft, getCompoundPaddingRight, setFragment, setFragment, setOnClickListener
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LoginButton

        LoginButton(Context context)
        Create the LoginButton by inflating from XML
      • LoginButton

        LoginButton(Context context, AttributeSet attrs)
        Create the LoginButton by inflating from XML
      • LoginButton

        LoginButton(Context context, AttributeSet attrs, Integer defStyle)
        Create the LoginButton by inflating from XML and applying a style.
    • Method Detail

      • getToolTipStyle

         final ToolTipPopup.Style getToolTipStyle()

        Style (background) of the Tool Tip popup. Currently a blue style and a black style are supported. Blue is default

      • setToolTipStyle

         final Unit setToolTipStyle(ToolTipPopup.Style toolTipStyle)

        Style (background) of the Tool Tip popup. Currently a blue style and a black style are supported. Blue is default

      • getToolTipMode

         final LoginButton.ToolTipMode getToolTipMode()

        The mode of the Tool Tip popup. Currently supported modes are default (normal behavior), always_on (popup remains up until forcibly dismissed), and always_off (popup doesn't show)

      • setToolTipMode

         final Unit setToolTipMode(LoginButton.ToolTipMode toolTipMode)

        The mode of the Tool Tip popup. Currently supported modes are default (normal behavior), always_on (popup remains up until forcibly dismissed), and always_off (popup doesn't show)

      • getToolTipDisplayTime

         final Long getToolTipDisplayTime()

        The amount of time (in milliseconds) that the tool tip will be shown to the user. The default is {@value com.facebook.login.widget.ToolTipPopup#DEFAULT_POPUP_DISPLAY_TIME}. Any value that is less than or equal to zero will cause the tool tip to be displayed indefinitely.

      • setToolTipDisplayTime

         final Unit setToolTipDisplayTime(Long toolTipDisplayTime)

        The amount of time (in milliseconds) that the tool tip will be shown to the user. The default is {@value com.facebook.login.widget.ToolTipPopup#DEFAULT_POPUP_DISPLAY_TIME}. Any value that is less than or equal to zero will cause the tool tip to be displayed indefinitely.

      • getLoggerID

         final String getLoggerID()

        The logger ID associated with the LoginButton

      • getCallbackManager

         final CallbackManager getCallbackManager()

        The callback manager registered to the login button.

      • setReadPermissions

        @Deprecated(message = Use setPermissions instead, replaceWith = @ReplaceWith(imports = {}, expression = setPermissions)) final Unit setReadPermissions(List<String> permissions)

        Set the permissions to use when the user logs in. The permissions here can only be read permissions. If any publish permissions are included, the login attempt by the user will fail. The LoginButton can only be associated with either read permissions or publish permissions, but not both. Calling both setReadPermissions and setPublishPermissions on the same instance of LoginButton will result in an exception being thrown unless clearPermissions is called in between.

        This method is only meaningful if called before the user logs in. If this is called after login, and the list of permissions passed in is not a subset of the permissions granted during the authorization, it will log an error.

        It's important to always pass in a consistent set of permissions to this method, or manage the setting of permissions outside of the LoginButton class altogether (by using the LoginManager explicitly).

        Parameters:
        permissions - the read permissions to use
      • setReadPermissions

        @Deprecated(message = Use setPermissions instead, replaceWith = @ReplaceWith(imports = {}, expression = setPermissions)) final Unit setReadPermissions(String permissions)

        Set the permissions to use when the user logs in. The permissions here can only be read permissions. If any publish permissions are included, the login attempt by the user will fail. The LoginButton can only be associated with either read permissions or publish permissions, but not both. Calling both setReadPermissions and setPublishPermissions on the same instance of LoginButton will result in an exception being thrown unless clearPermissions is called in between.

        This method is only meaningful if called before the user logs in. If this is called after login, and the list of permissions passed in is not a subset of the permissions granted during the authorization, it will log an error.

        It's important to always pass in a consistent set of permissions to this method, or manage the setting of permissions outside of the LoginButton class altogether (by using the LoginManager explicitly).

        Parameters:
        permissions - the read permissions to use
      • setPermissions

         final Unit setPermissions(String permissions)

        Set the permissions to use when the user logs in. The permissions here can be either read or write permissions.

        This method is only meaningful if called before the user logs in. If this is called after login, and the list of permissions passed in is not a subset of the permissions granted during the authorization, it will log an error.

        It's important to always pass in a consistent set of permissions to this method, or manage the setting of permissions outside of the LoginButton class altogether (by using the LoginManager explicitly).

        Parameters:
        permissions - the read and write permissions to use
      • setPublishPermissions

        @Deprecated(message = Use setPermissions instead, replaceWith = @ReplaceWith(imports = {}, expression = setPermissions)) final Unit setPublishPermissions(List<String> permissions)

        Set the permissions to use when the user logs in. The permissions here should only be publish permissions. If any read permissions are included, the login attempt by the user may fail. The LoginButton can only be associated with either read permissions or publish permissions, but not both. Calling both setReadPermissions and setPublishPermissions on the same instance of LoginButton will result in an exception being thrown unless clearPermissions is called in between.

        This method is only meaningful if called before the user logs in. If this is called after login, and the list of permissions passed in is not a subset of the permissions granted during the authorization, it will log an error.

        It's important to always pass in a consistent set of permissions to this method, or manage the setting of permissions outside of the LoginButton class altogether (by using the LoginManager explicitly).

        Parameters:
        permissions - the publish permissions to use
      • setPublishPermissions

        @Deprecated(message = Use setPermissions instead, replaceWith = @ReplaceWith(imports = {}, expression = setPermissions)) final Unit setPublishPermissions(String permissions)

        Set the permissions to use when the user logs in. The permissions here should only be publish permissions. If any read permissions are included, the login attempt by the user may fail. The LoginButton can only be associated with either read permissions or publish permissions, but not both. Calling both setReadPermissions and setPublishPermissions on the same instance of LoginButton will result in an exception being thrown unless clearPermissions is called in between.

        This method is only meaningful if called before the user logs in. If this is called after login, and the list of permissions passed in is not a subset of the permissions granted during the authorization, it will log an error.

        It's important to always pass in a consistent set of permissions to this method, or manage the setting of permissions outside of the LoginButton class altogether (by using the LoginManager explicitly).

        Parameters:
        permissions - the publish permissions to use
      • clearPermissions

         final Unit clearPermissions()

        Clears the permissions currently associated with this LoginButton.

      • dismissToolTip

         final Unit dismissToolTip()

        Dismisses the Tooltip if it is currently visible

      • registerCallback

         final Unit registerCallback(CallbackManager callbackManager, FacebookCallback<LoginResult> callback)

        Registers a login callback to the given callback manager.

        Parameters:
        callbackManager - The callback manager that will encapsulate the callback.
        callback - The login callback that will be called on login completion.
      • unregisterCallback

         final Unit unregisterCallback(CallbackManager callbackManager)

        Unregisters a login callback to the given callback manager.

        Parameters:
        callbackManager - The callback manager that will encapsulate the callback.