# Class FacebookShare

java.lang.Object
com.codename1.ui.Command
com.codename1.share.ShareService
com.codename1.share.FacebookShare

All Implemented Interfaces:
  `ActionListener<ActionEvent>`

@Deprecated public class FacebookShare extends ShareService
Deprecated.
This share service relies on the legacy `FaceBookAccess` OAuth/Graph flow which is no longer supported by Facebook. Use a `BrowserComponent` pointed at a Facebook share URL, or delegate to the native share sheet. This class will be removed in a future release.
Facebook sharing service

- ## Field Summary

  ### Fields inherited from class Command

  `DESKTOP_MENU, DESKTOP_MENU_ABOUT, DESKTOP_MENU_APP, DESKTOP_MENU_EDIT, DESKTOP_MENU_FILE, DESKTOP_MENU_HELP, DESKTOP_MENU_PREFERENCES, DESKTOP_MENU_QUIT, DESKTOP_MENU_VIEW, DESKTOP_MENU_WINDOW, DESKTOP_SHORTCUT_KEY, DESKTOP_SHORTCUT_MODIFIER_ALT, DESKTOP_SHORTCUT_MODIFIER_PRIMARY, DESKTOP_SHORTCUT_MODIFIER_SHIFT, DESKTOP_SHORTCUT_MODIFIERS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FacebookShare()`
  Deprecated.
  Default Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `actionPerformed(ActionEvent evt)`
  Deprecated.
  This method is called when the soft button/Menu item is clicked
  `boolean`
  `canShareImage()`
  Deprecated.
  The implementing service needs to declare if it is capable to share an image
  `boolean`
  `equals(Object o)`
  Deprecated.
  compare two commands
  `Image`
  `getIcon()`
  Deprecated.
  Returns the icon representing the command
  `int`
  `hashCode()`
  Deprecated.
  Allows storing commands in a vector/hashtable
  `void`
  `share(String toShare)`
  Deprecated.
  This is the sharing method which should be implemented by the service.
  `void`
  `share(String text, String image, String mime)`
  Deprecated.
  This is the image sharing method which should be implemented by the service, if the service returned true on the canShareImage() method Notice not all services are able to share text and image together, in this case the image sharing will be preferred by these services

  ### Methods inherited from class ShareService

  `deliverResult, finish, getOriginal, getShareResultListener, setImage, setMessage, setOriginalForm, setShareResultListener`

  ### Methods inherited from class Command

  `create, createMaterial, getClientProperty, getCommandName, getDesktopMenu, getDesktopShortcutKeyChar, getDesktopShortcutModifiers, getDisabledIcon, getIconFont, getIconGapMM, getId, getMaterialIcon, getMaterialIconSize, getPressedIcon, getRolloverIcon, isDisposesDialog, isEnabled, putClientProperty, setCommandName, setDesktopMenu, setDesktopShortcut, setDesktopShortcut, setDisabledIcon, setDisposesDialog, setEnabled, setIcon, setIconFont, setIconGapMM, setMaterialIcon, setMaterialIconSize, setPressedIcon, setRolloverIcon, toString`

  ### Methods inherited from class Object

  `clone, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### FacebookShare

    public FacebookShare()
    Deprecated.
    Default Constructor

- ## Method Details

  - ### getIcon

    public Image getIcon()
    Deprecated.
    Description copied from class: `Command`

    Returns the icon representing the command

    ###### Returns

    an icon representing the command

    Overrides:
      `getIcon` in class `Command`

  - ### equals

    public boolean equals(Object o)
    Deprecated.
    Description copied from class: `Command`

    compare two commands

    ###### Parameters

    - `obj`: a Command Object to compare

    ###### Returns

    true if the obj has the same command name

    Overrides:
      `equals` in class `Command`

  - ### hashCode

    public int hashCode()
    Deprecated.

    Allows storing commands in a vector/hashtable

    ###### Returns

    unique hashcode for the command class

    Overrides:
      `hashCode` in class `Command`

  - ### actionPerformed

    public void actionPerformed(ActionEvent evt)
    Deprecated.

    This method is called when the soft button/Menu item is clicked

    ###### Parameters

    - `evt`: the Event Object
    Specified by:
      `actionPerformed` in interface `ActionListener<ActionEvent>`
    Overrides:
      `actionPerformed` in class `ShareService`

  - ### share

    public void share(String text, String image, String mime)
    Deprecated.

    This is the image sharing method which should be implemented by the service, if the service returned true on the canShareImage() method Notice not all services are able to share text and image together, in this case the image sharing will be preferred by these services

    ###### Parameters

    - `text`: text to share

    - `image`: image to share

    Overrides:
      `share` in class `ShareService`

  - ### share

    public void share(String toShare)
    Deprecated.

    This is the sharing method which should be implemented by the service.

    ###### Parameters

    - `text`: text to share
    Specified by:
      `share` in class `ShareService`

  - ### canShareImage

    public boolean canShareImage()
    Deprecated.

    The implementing service needs to declare if it is capable to share an image

    ###### Returns

    true if the service can share images

    Specified by:
      `canShareImage` in class `ShareService`