Tsugi

TwitterShare
in package
implements BadgeSharePlatform

Share badge to Twitter/X via web intent.

Table of Contents

Interfaces

BadgeSharePlatform
Interface for badge sharing to social media platforms.

Methods

getIconClass()  : string
Optional: Font Awesome icon class (e.g., 'fa-brands fa-x-twitter').
getName()  : string
Human-readable platform name.
getShareUrl()  : string
Build the share URL for this platform.

Methods

getIconClass()

Optional: Font Awesome icon class (e.g., 'fa-brands fa-x-twitter').

public getIconClass() : string
Return values
string

getName()

Human-readable platform name.

public getName() : string
Return values
string

getShareUrl()

Build the share URL for this platform.

public getShareUrl(string $url, string $text) : string
Parameters
$url : string

The URL to share (e.g., badge assertion URL)

$text : string

Pre-populated share text (e.g., "I earned the X badge from CA4E!")

Return values
string —

Full URL to open for sharing


        
On this page

Search results