minulhasanrokan/customer-social-finder
Composer 安装命令:
composer require minulhasanrokan/customer-social-finder
包简介
Find customer social profiles by name, profession, company, and location using Google Custom Search.
README 文档
README
A Laravel package to help find social media profiles (LinkedIn, Facebook, Twitter) of a person based on their name, profession, company, and location — using the Google Custom Search API.
🚀 Features
- 🧠 Accepts name, profession, company, and location as input
- 🔍 Searches LinkedIn, Facebook, and Twitter using Google Custom Search
- 📷 Displays title, link, snippet, and thumbnail (if available)
- 🎨 Includes a ready-to-use Blade view
📥 Installation
Step 1: Require via Composer
composer require minulhasanrokan/customer-social-finder
📂 Publish Views (Optional)
To publish the default Blade view:
php artisan vendor:publish --tag=views
⚙️ Configuration
Step 1: Add Google API credentials to .env
GOOGLE_API_KEY=your_google_api_key GOOGLE_CX_ID=your_custom_search_engine_id
Step 2: Update config/services.php
'google' => [ 'key' => env('GOOGLE_API_KEY'), 'cx' => env('GOOGLE_CX_ID'), ],
🔗 Route Setup
You can add a route in your web.php to use the form:
use Minulhasanrokan\CustomerSocialFinder\Http\Controllers\SocialProfileController; Route::match(['get', 'post'], '/social-finder', [SocialProfileController::class, 'index']);
🖼️ Blade View Example
Here’s how the output is structured:
@foreach ($results as $result) <div class="profile-card"> <h3>{{ $result['title'] }}</h3> <a href="{{ $result['link'] }}" target="_blank">{{ $result['link'] }}</a> <p>{{ $result['snippet'] }}</p> @if($result['image']) <img src="{{ $result['image'] }}" alt="Thumbnail"> @endif </div> @endforeach
🔐 How to Get Google API Credentials
- Visit Google Cloud Console
- Create a new project
- Enable Custom Search JSON API
- Go to Programmable Search Engine
- Create a new search engine with sites like:
*.linkedin.com, *.facebook.com, *.twitter.com - Get your Search Engine ID (cx) and API key
🧾 Example Search Query
The search will build something like:
John Doe Software Engineer Acme Inc New York site:linkedin.com OR site:facebook.com OR site:twitter.com
This query is passed to Google’s Custom Search API.
🛠 Requirements
- PHP ^8.0
- Laravel ^10.0 || ^11.0 || ^12.0
- Google Custom Search API credentials
📁 Project Structure
src/ ├── Http/ │ └── Controllers/ │ └── SocialProfileController.php ├── resources/ │ └── views/ │ └── form.blade.php ├── routes/ │ └── web.php └── CustomerSocialFinderServiceProvider.php
🙋 License
MIT License © Md. Minul Hasan
minulhasanrokan/customer-social-finder 适用场景与选型建议
minulhasanrokan/customer-social-finder 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 04 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 minulhasanrokan/customer-social-finder 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 minulhasanrokan/customer-social-finder 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 26
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-21