FacebookShare
in package
implements
BadgeSharePlatform
Share badge to Facebook via sharer.
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
stringgetName()
Human-readable platform name.
public
getName() : string
Return values
stringgetShareUrl()
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