hilalahmad / social-share
The Social-share PHP package is a versatile and easy-to-use library designed to simplify the integration of social media sharing functionality into PHP applications. With this package, developers can effortlessly generate share links for various social media platforms and customize the associated st
Requires
- php: ^7.2 || ^8.0
This package is auto-updated.
Last update: 2025-04-11 07:41:48 UTC
README
The Social-share PHP package is a versatile and easy-to-use library designed to simplify the integration of social media sharing functionality into PHP applications. With this package, developers can effortlessly generate share links for various social media platforms and customize the associated styles.
Table of Contents
Installation
You can install this package using Composer, a popular PHP package manager:
composer require hilalahmad/social-share
Features
Platform Support:
- Generate share links for popular social media platforms including Facebook, WhatsApp, Email, SMS, Pinterest, Reddit, Outlook, LinkedIn, and Twitter.
Custom Styling:
- Easily apply custom styles to the generated share links to seamlessly integrate them with your application's design.
Simple Integration:
- The package provides a straightforward interface, making it simple for developers to incorporate social media sharing features into their PHP projects.
Flexibility:
- Adapt the package to your specific use case by customizing the default design styles and easily extending it to support additional social media platforms.
Basic Usage
Here's an example of how to use the HttpClient package to send a GET request:
use Hilalahmad\SocialShare\SocialShare; $socialShare = new SocialShare(); echo $socialShare->facebook(url); echo $socialShare->whatsapp(url); echo $socialShare->email(url); echo $socialShare->sms($phoneNumber,$message); echo $socialShare->linkedin($url); echo $socialShare->pinterest($url,$image_url,$content); echo $socialShare->reddit($url,$content); echo $socialShare->tumblr($url,$title); echo $socialShare->outlook($url,$subject,$body); echo $socialShare->twitter($url,$text);
Generate Share Links in HTML
- You can now directly embed the generated share links with custom styles into your HTML code:
Contribution
If you'd like to contribute to this package or report issues, please check the Github repo for more details.
License
This package is open-source and is licensed under the MIT License.