PHPackages                             putheakhem/laravel-social-stats - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. putheakhem/laravel-social-stats

ActiveLibrary

putheakhem/laravel-social-stats
===============================

Fetch follower/subscriber stats from various social media platforms.

v1.1.3(1y ago)2462MITPHPPHP &gt;=8.2

Since Mar 28Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/putheakhem/laravel-social-stats)[ Packagist](https://packagist.org/packages/putheakhem/laravel-social-stats)[ Docs](https://github.com/putheakhem/laravel-social-stats)[ RSS](/packages/putheakhem-laravel-social-stats/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (9)Versions (6)Used By (0)

Laravel Social Stats
====================

[](#laravel-social-stats)

[![Latest Version](https://camo.githubusercontent.com/90847356b89b2d04ecb22f0a495e44a0b827d0014bf06ff3998fb3285bbe009f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7075746865616b68656d2f6c61726176656c2d736f6369616c2d73746174732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/putheakhem/laravel-social-stats)[![Total Downloads](https://camo.githubusercontent.com/90b65f2f0a7e88c8172fb1fbd28a2397c0f4883ab8f7fb8027e1ccb62bb037c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7075746865616b68656d2f6c61726176656c2d736f6369616c2d73746174732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/putheakhem/laravel-social-stats)[![License](https://camo.githubusercontent.com/e18852e3f6f23e3749eab3c6b2d52f238e55a9569118e1ccc329a3e4a87c0e42/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7075746865616b68656d2f6c61726176656c2d736f6369616c2d73746174732e7376673f7374796c653d666c61742d737175617265)](LICENSE)

A Laravel package to fetch follower/subscriber counts from various social media platforms including Telegram, YouTube, and Facebook Pages.

---

🇰🇭 Stand with Cambodia • កម្ពុជា
--------------------------------

[](#-stand-with-cambodia--កម្ពុជា)

### 🕊️ Cambodia Needs Peace 🕊️

[](#️-cambodia-needs-peace-️)

With heavy hearts, we stand with our brave soldiers defending Cambodia’s land and dignity.
We seek no conflict—only peace, justice, and respect for our sovereignty.

**🙏 កម្ពុជាត្រូវការសន្តិភាព • Together to protect Cambodia’s sovereignty.**

---

✨ Features
----------

[](#-features)

- 📊 Get real-time follower counts from:
    - Telegram Channels
    - YouTube Channels
    - Facebook Pages
    - Instagram Followers (via connected Facebook Page)
    - TikTok Followers
- ⚡ Built Support Laravel 11+ &amp; PHP 8.2+
- 🔒 Caching with Laravel’s new `Cache::flexible()`
- 🧹 Facade support: `SocialStats::platform('telegram')`

---

📦 Installation
--------------

[](#-installation)

```
composer require putheakhem/laravel-social-stats
```

> Ensure you’ve configured your Laravel app to support package discovery.

---

⚙️ Configuration
----------------

[](#️-configuration)

Publish the config file:

```
php artisan vendor:publish --tag=config
```

Set the following in `.env`:

```
YOUTUBE_API_KEY=your_youtube_api_key
FACEBOOK_ACCESS_TOKEN=your_facebook_access_token
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
INSTAGRAM_ACCESS_TOKEN=your_instagram_access_token
INSTAGRAM_PAGE_ID=your_instagram_business_account_id
```

---

🔧 Usage
-------

[](#-usage)

```
use SocialStats;

// Telegram
SocialStats::platform('telegram')->fetchCount('your_channel_username'); // No @ symbol

// YouTube
SocialStats::platform('youtube')->fetchCount('UCxxxxxxx'); // Channel ID

// Facebook Page
SocialStats::platform('facebook')->fetchCount('your_page_id'); // Page ID Number (3127652********)

// Instagram (uses page_id to discover linked Instagram account)
SocialStats::platform('instagram')->fetchCount('fintechcenterfsa'); // Instagram username

// TikTok
SocialStats::platform('tiktok')->fetchCount('your_tiktok_username'); // TikTok username
```

> The package uses Laravel’s built-in HTTP and cache systems.

---

✅ Supported Platforms
---------------------

[](#-supported-platforms)

- ✅ Telegram Channels Subscribers
- ✅ YouTube Channels Subscribers
- ✅ Facebook Page Likes
- ✅ Instagram Followers (via connected Facebook Page)
- ✅ TikTok Follower
- ⏳ Twitter Follower (planned)

---

🔪 Testing
---------

[](#-testing)

To run tests:

```
composer test
```

---

Support Me
----------

[](#support-me)

If you find this package useful, consider supporting my work:

- [Buy me a coffee](https://www.buymeacoffee.com/iamputhea)

📄 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

---

💡 Contributing
--------------

[](#-contributing)

Feel free to submit PRs or open issues for suggestions and improvements.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance65

Regular maintenance activity

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

5

Last Release

404d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/764935335a012f6477a36e9bf81144d2c887becfbd0dea300426a27f7677ab93?d=identicon)[putheakhem](/maintainers/putheakhem)

---

Top Contributors

[![putheakhem](https://avatars.githubusercontent.com/u/8064772?v=4)](https://github.com/putheakhem "putheakhem (12 commits)")

---

Tags

laravelfacebookyoutubesocialtelegramstatisticsFollowers

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/putheakhem-laravel-social-stats/health.svg)

```
[![Health](https://phpackages.com/badges/putheakhem-laravel-social-stats/health.svg)](https://phpackages.com/packages/putheakhem-laravel-social-stats)
```

###  Alternatives

[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[rennokki/befriended

Eloquent Befriended brings social media-like features like following, blocking and filtering content based on following or blocked models.

76292.2k1](/packages/rennokki-befriended)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[casperlaitw/laravel-fb-messenger

A Laravel Package to Integrate Facebook Messenger API

10631.5k](/packages/casperlaitw-laravel-fb-messenger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
