Add Facebook webhook integration for live video notifications#1
Add Facebook webhook integration for live video notifications#1
Conversation
Co-authored-by: jkrrv <1238391+jkrrv@users.noreply.github.com>
Co-authored-by: jkrrv <1238391+jkrrv@users.noreply.github.com>
Co-authored-by: jkrrv <1238391+jkrrv@users.noreply.github.com>
Co-authored-by: jkrrv <1238391+jkrrv@users.noreply.github.com>
Co-authored-by: jkrrv <1238391+jkrrv@users.noreply.github.com>
|
@copilot Please also provide the stub method with the name of the video. |
… add i18n Co-authored-by: jkrrv <1238391+jkrrv@users.noreply.github.com>
Done in commit 978b2ab:
|
Implements webhook endpoint to detect when the
/tenthFacebook page starts a live video, extract the video ID and title, and pass them to a handler method.Implementation
REST API endpoint at
/wp-json/shimmer/v1/facebook-webhook:status === 'live'and callsFacebookWebhook::handleLiveVideo($videoId, $videoTitle)Universal settings system at Settings → Shimmer:
ShimmerSettingsclass for centralized settings management across all Shimmer componentsFiles:
shimmer/ShimmerSettings.php- Universal settings system (new)shimmer/FacebookWebhook.php- Webhook handlershimmer.php- Initialization for both classesUsage
Settings stored as:
shimmer_facebook_app_secretoptionshimmer_facebook_verify_tokenoptionWebhook subscribes to the
live_videosfield on Facebook page.Internationalization
All user-facing strings use WordPress i18n functions (
__(),esc_html_e(),wp_kses_post()) with text domainshimmer, making the interface ready for translation.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.