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.
You can install this package using Composer, a popular PHP package manager:
composer require hilalahmad/social-share
- Generate share links for popular social media platforms including Facebook, WhatsApp, Email, SMS, Pinterest, Reddit, Outlook, LinkedIn, and Twitter.
- Easily apply custom styles to the generated share links to seamlessly integrate them with your application's design.
- The package provides a straightforward interface, making it simple for developers to incorporate social media sharing features into their PHP projects.
- Adapt the package to your specific use case by customizing the default design styles and easily extending it to support additional social media platforms.
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);
- You can now directly embed the generated share links with custom styles into your HTML code:
If you'd like to contribute to this package or report issues, please check the Github repo for more details.
This package is open-source and is licensed under the MIT License.