elephpant / social-share
A simple way to generate social share links.
2.0.1
2023-09-25 15:06 UTC
Requires
- php: ^8.2
Requires (Dev)
- phpunit/phpunit: ^9
README
A simple way to generate social share links.
Um jeito simples de gerar links de compartilhamento social.
Highlights
- Simple installation (Instalação simples)
- Composer ready and PSR-2 compliant (Pronto para o composer e compatível com PSR-2)
Available services
- Telegram
Installation
SocialShare is available via Composer:
"elephpant/social-share": "2.0.*"
or run
composer require elephpant/social-share
Documentation
For details on how to use, see a sample folder in the component directory. In it you will have an example of using the class. It works like this:
Para mais detalhes sobre como usar, veja uma pasta de exemplo no diretório do componente. Nela terá um exemplo de uso da classe. Ele funciona assim:
Basic Usage:
<?php require __DIR__ . '/../vendor/autoload.php'; use ElePHPant\SocialShare\SocialShare; // [required] $url, [required] $text $share = new SocialShare('https://github.com', 'Build software better, together'); ?> <ul> <li><a href="<?= $share::facebook(); ?>" target="_blank">Facebook</a></li> <li><a href="<?= $share::twitter(/* $username */); ?>" target="_blank">Twitter</a></li> <li><a href="<?= $share::linkedin(/* $summary, $source */); ?>" target="_blank">LinkedIn</a></li> <li><a href="<?= $share::pinterest(/* $image */); ?>" target="_blank">Pinterest</a></li> <li><a href="<?= $share::whatsapp(); ?>" target="_blank">WhatsApp</a></li> <li><a href="<?= $share::telegram(); ?>" target="_blank">Telegram</a></li> <li><a href="<?= $share::reddit(); ?>" target="_blank">Reddit</a></li> <li><a href="<?= $share::email(/* $recipientEmail */); ?>" target="_blank">Email</a></li> </ul>
Contributing
Please see CONTRIBUTING for details.
Credits
- Wilder Amorim (Developer)
- Agência Uebi (Team)
- All Contributors (This Rock)
License
The MIT License (MIT). Please see License File for more information.