DeviceShareButton

A button to share content on Facebook from a device. Tapping the receiver will invoke the DeviceShareDialog with the attached shareContent.

확장:FacebookButtonBase
패키지:widget
생성자
DeviceShareButton(Context)
public DeviceShareButton(Context context)
매개변수설명
context
DeviceShareButton(Context, AttributeSet)
public DeviceShareButton(Context context, AttributeSet attrs)
매개변수설명
context
attrs
인스턴스 메서드
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)
매개변수설명
shareContentThe share content.
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)
매개변수설명
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)
매개변수설명
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).
getShareOnClickListener()
protected OnClickListener getShareOnClickListener()