Skip to content

procom-dev/whatsapp-share-widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WhatsApp Share Widget Generator

WhatsApp Share Widget Generator

Allow people in you website to easily share your page by WhatsApp with just 1 click! This easy-to-use tool creates beautiful WhatsApp sharing widgets that help your supporters share your petitions, campaigns, and causes directly with their friends and family.

πŸš€ Why WhatsApp Sharing Works Better

Personal Connection = Higher Impact
Unlike Facebook or X (Twitter) where posts get lost in busy feeds, WhatsApp messages go directly to people your supporters trust most - their family and close friends. When someone shares your petition through WhatsApp, they're having a personal conversation, not broadcasting to strangers.

The Numbers Don't Lie
Studies show that messages shared via WhatsApp have:

  • πŸ“ˆ 5x higher open rates than social media posts
  • πŸ’¬ 3x more likely to be read completely
  • 🀝 Higher conversion rates because they come from trusted contacts
  • πŸ“± Better mobile engagement since WhatsApp is primarily used on phones

🎯 Perfect for Activists & Organizations

Action Network Integration

Seamlessly works with your Action Network petitions! Simply paste your petition URL, and the tool automatically grabs the title, description, and image to create a professional-looking share widget.

Lunda Integration - Double Your Impact! πŸ’°

Here's where it gets exciting: Set up a two-step conversion strategy

  1. First CTA: People share your petition via WhatsApp
  2. Second CTA: After sharing, they're redirected to your Lunda donation page

Result: Your supporters share your cause AND see your donation ask. It's like getting two actions from one click!

Perfect For:

  • πŸ“ Petition campaigns (Action Network, Change.org, etc.)
  • πŸ›οΈ Political campaigns
  • 🌱 Environmental causes
  • πŸ₯ Healthcare advocacy
  • πŸŽ“ Education campaigns
  • πŸ’ Nonprofit fundraising

✨ What You Get

  • πŸ”„ Auto-Magic Setup: Just paste your petition URL and we grab all the details automatically
  • πŸ‘€ Live Preview: See exactly how your message will look in WhatsApp before publishing
  • ✏️ Easy Text Formatting: Make text bold, italic, or strikethrough with simple buttons
  • πŸ“± Mobile-Perfect: Looks great on phones, tablets, and computers
  • πŸ“§ Email Ready: Get code that works in both websites and email campaigns
  • 🎯 Smart Redirects: Send people to your donation page after they share
  • πŸ“Š Character Counter: Keeps your message within WhatsApp's limits

πŸš€ Try It Now!

Live Demo: WhatsApp Share Widget Generator
Start creating your first widget in under 2 minutes!

πŸ“‹ Quick Start (No Technical Skills Needed!)

You don't need to know coding! This tool is designed for activists, campaign managers, and nonprofit workers who want results, not technical headaches.

Option 1: Use Our Hosted Version (Easiest)

  1. Go to sharer.wha.chat
  2. Paste your petition or campaign URL
  3. Customize your message
  4. Copy the code and paste it into your website

Option 2: Install on Your Own Website

  1. Download the files

    git clone https://github.com/procom-dev/whatsapp-share-widget.git
  2. Upload to your website

    • Contact your web developer or hosting provider
    • They'll need PHP enabled on your server
  3. Start creating widgets!

    • Open the tool in your browser
    • No configuration needed - it works right away

πŸ“ Project Structure

whatsapp-share-widget/
β”œβ”€β”€ index.php              # Main application interface
β”œβ”€β”€ fetch-metadata.php     # Server-side metadata extraction
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── style.css      # Complete styling
β”‚   └── js/
β”‚       └── script.js      # Client-side logic
β”œβ”€β”€ images/                # Project images and screenshots
β”œβ”€β”€ 404.html              # Custom 404 error page
β”œβ”€β”€ 502.html              # Custom 502 error page
└── README.md              # This file

πŸ“± How to Use (Step by Step)

Creating Your First Widget

  1. πŸ“ Enter Your URL
    Paste your Action Network petition, Lunda page, or any campaign URL

  2. πŸ”„ Click "Fetch Data"
    The tool automatically grabs your title, description, and image

  3. ✏️ Customize Your Message

    • Edit the text people will see in WhatsApp
    • Use the formatting buttons to make text bold or italic
    • Add emojis to make it more engaging! 🌟
  4. 🎯 Set Your Redirect (Optional)
    Add your Lunda donation page URL so people see your fundraising ask after sharing

  5. πŸ“‹ Copy Your Code
    Choose "Web HTML" for websites or "Email HTML" for email campaigns

  6. πŸš€ Paste and Publish
    Add the code to your website, email, or send it to your web team

Pro Tips for Better Results

  • βœ… Keep messages personal and conversational
  • βœ… Include why YOU care about this issue
  • βœ… Add relevant emojis (but don't overdo it!)
  • βœ… Test the widget on your phone first
  • βœ… Use urgent but not alarmist language

🎨 Customization

CSS Customization

The widget styling can be customized by modifying the inline styles in the generated HTML or by overriding with your own CSS.

PHP Configuration

  • Modify fetch-metadata.php to customize metadata extraction logic
  • Adjust character limits and validation rules in assets/js/script.js

🌐 Browser Support

  • Chrome/Chromium 60+
  • Firefox 55+
  • Safari 12+
  • Edge 79+
  • Mobile browsers (iOS Safari, Chrome Mobile)

πŸ“± WhatsApp Integration

The generated widgets use WhatsApp's official wa.me URL format:

  • Format: https://wa.me/?text=YOUR_MESSAGE
  • Automatically URL-encodes messages
  • Preserves WhatsApp formatting in the shared message
  • Works on both mobile and desktop WhatsApp

πŸ”’ Security Features

  • URL validation and sanitization
  • XSS protection in metadata extraction
  • Safe HTML generation with proper escaping
  • CSRF protection through form handling

🀝 Contributing & Support

Found a Bug or Have an Idea?

We'd love to hear from you! Please use GitHub Issues to:

  • Report bugs πŸ›
  • Request new features πŸ’‘
  • Ask questions ❓
  • Share success stories πŸŽ‰

Want to Contribute Code?

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a Pull Request

Need Help?

  • πŸ“– Documentation: This README has everything you need
  • πŸ†˜ Issues: GitHub Issues
  • πŸ’¬ Community: Share your experience with other activists and developers

πŸ“„ License

This project is open source (MIT License) - use it freely for your campaigns and causes!

πŸ™ Built for Changemakers

This tool was created specifically for:

  • πŸ›οΈ Political campaigners fighting for change
  • 🌍 Environmental activists protecting our planet
  • πŸ“’ Social justice advocates demanding equality
  • πŸ’ Nonprofit organizations making a difference
  • πŸ—³οΈ Grassroots organizers building movements

Because every share matters, and every voice counts.


Ready to amplify your impact? Start creating widgets now! πŸš€

About

Allow people in you website to easily share your page by WhatsApp with just 1 click!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published