Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mrdotb's avatar

[L5] custom social share button with count

Hi, I want to add a custom share (facebook, twitter ...) button + count in my L5 app. How to do it? Thanks

0 likes
2 replies
khoanguyenme's avatar
Level 3

These things are ussually done with javascript. My favorite package : https://github.com/filamentgroup/SocialCount/

If your insists on making a server side render for this. Learn about facebook/twitter... 's API to get count data of your URL. Then use Guzzle (or even plain old CURL) to fetch data and show it in your views

Please or to participate in this conversation.