ShareButtonBase
Une version plus récente de cette classe est disponible. Rendez-vous sur la dernière version.

A base class for sharing buttons.

Prolonge :FacebookButtonBase
Package :widget
Constructeurs
ShareButtonBase(Context, AttributeSet, int, String, String)
protected ShareButtonBase(Context context, AttributeSet attrs, int defStyleAttr, String analyticsButtonCreatedEventName, String analyticsButtonTappedEventName)
ParamètreDescription
context
attrs
defStyleAttr
analyticsButtonCreatedEventName
analyticsButtonTappedEventName
Méthodes d’instance
getShareContent()

Returns the share content from the button.

public ShareContent getShareContent()
Returns
The share content.
setShareContent(ShareContent)

Sets the share content on the button.

public void setShareContent(ShareContent shareContent)
ParamètreDescription
shareContentThe share content.
setRequestCode(int)

Set the request code for the startActivityForResult call. The requestCode should be outside of the range of those reserved for the Facebook SDK FacebookSdk.isFacebookRequestCode(int). This method should also be called prior to registering any callbacks.

protected void setRequestCode(int requestCode)
ParamètreDescription
requestCodeThe request code to use.
registerCallback(CallbackManager, FacebookCallback)

Allows registration of a callback for when the share completes. This should be called in the Activity.onCreate(android.os.Bundle) or Fragment.onCreate(android.os.Bundle) methods.

public void registerCallback(CallbackManager callbackManager, FacebookCallback callback)
ParamètreDescription
callbackManagerThe CallbackManager instance that will be handling results that are received via Activity.onActivityResult(int, int, android.content.Intent)
callbackThe callback that should be called to handle dialog completion.
registerCallback(CallbackManager, FacebookCallback, int)

Allows registration of a callback for when the share completes. This should be called in the Activity.onCreate(android.os.Bundle) or Fragment.onCreate(android.os.Bundle) methods.

public void registerCallback(CallbackManager callbackManager, FacebookCallback callback, int requestCode)
ParamètreDescription
callbackManagerThe CallbackManager instance that will be handling results that are received via Activity.onActivityResult(int, int, android.content.Intent)
callbackThe callback that should be called to handle dialog completion.
requestCodeThe request code to use, this should be outside of the range of those reserved for the Facebook SDK FacebookSdk.isFacebookRequestCode(int).
canShare()
protected boolean canShare()
getShareOnClickListener()
protected OnClickListener getShareOnClickListener()
getDialog()
protected abstract FacebookDialogBase getDialog()