class UrlButton extends Button (View source)

Class UrlButton

Constants

TYPE_WEB

Web url button type

TYPE_POSTBACK

Postback button type

TYPE_CALL

Phone call button type

TYPE_SHARE

Share button type

TYPE_ACCOUNT_LINK

Account link

TYPE_COMPACT

Compact height ratio

TYPE_TALL

Tall height ratio

TYPE_FULL

Full height ratio

Methods

__construct($title, $url)

UrlButton constructor.

array
toData()

To array for send api

string
getType()

Get button type.

from Button
$this
setExtra(array $value)

Set button extra

from Button
$this
useMessengerExtensions()

Use messenger extensions

$this
setWebviewHeightRatio($value)

Set webview height ratio

$this
setFallbackUrl(string $url)

Set fallback url

$this
disableShare()

Disable share

Details

__construct($title, $url)

UrlButton constructor.

Parameters

$title
$url

array toData()

To array for send api

Return Value

array

string getType()

Get button type.

Return Value

string

$this setExtra(array $value)

Set button extra

Parameters

array $value

Return Value

$this

$this useMessengerExtensions()

Use messenger extensions

Return Value

$this

$this setWebviewHeightRatio($value)

Set webview height ratio

Parameters

$value

Return Value

$this

$this setFallbackUrl(string $url)

Set fallback url

Parameters

string $url

Return Value

$this

$this disableShare()

Disable share

Return Value

$this