PHPackages                             socola/sdk-php-chatfuel-socola - 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. [API Development](/categories/api)
4. /
5. socola/sdk-php-chatfuel-socola

ActiveLibrary[API Development](/categories/api)

socola/sdk-php-chatfuel-socola
==============================

class gender json for chatbot facebook chatfuel

v1.1.1(8y ago)1261MITPHPPHP &gt;=5.3.0

Since Feb 4Pushed 8y ago1 watchersCompare

[ Source](https://github.com/SocolaDaiCa/SDK-Php-Chatfuel-Socola)[ Packagist](https://packagist.org/packages/socola/sdk-php-chatfuel-socola)[ RSS](/packages/socola-sdk-php-chatfuel-socola/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

SDK-Php-Chatfuel-Socola
=======================

[](#sdk-php-chatfuel-socola)

SDK Php Chatfue Socola
Using php to generate JSON for Chatfuel bot

Create bot
----------

[](#create-bot)

```
use Socola\Chatfuel;
$bot = new Chatfuel();
```

Send text
---------

[](#send-text)

```
$text = 'Socola';
$texts = [$text, $text, $text, $text];
$bot->sendText($text);
$bot->sendText($texts);
```

Send image
----------

[](#send-image)

```
$image = 'http://i.imgur.com/luWlRwV.jpg';
$images = [
	'http://i.imgur.com/luWlRwV.jpg',
	'http://i.imgur.com/luWlRwV.jpg'
];
$bot->sendImage($image);
$bot->sendImage(images);
```

Send file
---------

[](#send-file)

```
$file = 'https://01b02091.ngrok.io/test.pdf';
$files = array(
	'https://01b02091.ngrok.io/test.pdf',
	'https://01b02091.ngrok.io/test.pdf'
);
$bot->sendFile($file);
$bot->sendFile($files);
```

Send audio
----------

[](#send-audio)

```
$audio = 'https://01b02091.ngrok.io/test.mp3';
$audios = [
	'https://01b02091.ngrok.io/test.mp3',
	'https://01b02091.ngrok.io/test.mp3'
];
$bot->sendAudio($audio);
$bot->sendAudio($audios);
```

Create a button
---------------

[](#create-a-button)

### Create Button To URL

[](#create-button-to-url)

```
$title = "button to url";
$url = "http://www.facebook.com";
$buttonToURL = $bot->createButtonToURL($title, $url, $setAttributes = Null);
```

### Create Button To Block

[](#create-button-to-block)

```
$title = "button to block";
$block = "re-start";
$buttonToBlock = $bot->createButtonToBlock($title, $block, $setAttributes = Null);
```

### Create Button Share

[](#create-button-share)

```
$buttonShare = $bot->createButtonShare();
```

### Create Button Call

[](#create-button-call)

```
$phoneNumber = '096******5';
$buttonCall  = $bot->createButtonCall($phoneNumber, $title = 'Call');
```

### Create Button Quick Reply

[](#create-button-quick-reply)

```
$block = 're-start';
$blocks = [
	'play',
	'pause'
];
$bot->createButtonQuickReply($title, $block);
$bot->createButtonQuickReply($title, $blocks);
```

### Send a text card with one or more button (max 3 buttons)

[](#send-a-text-card-with-one-or-more-button-max-3-buttons)

```
$text = 'this is text card';
$uttons = [
	$buttonToURL,
	$buttonToBlock,
	$buttonShare
];
$bot->sendTextCard($text, $button);
$bot->sendTextCard($text, $buttons);
```

### Create element

[](#create-element)

```
$title    = 'this is element';
$image    = 'http://i.imgur.com/luWlRwV.jpg';
$subTitle = 'this is sub title';
$element  = $bot->createElement($title, $image, $subTitle, $button_or_arrayButtons);
$arrayElements = array(
	$element1,
	$element2
);
```

### Send a gallery

[](#send-a-gallery)

```
$bot->sendGallery($element_or_arrayElements);
```

### Send a list template min 2 element

[](#send-a-list-template-min-2-element)

You can switch type “top\_element\_style” between “large” and “compact”.

```
$topElementStyle = 'large';
$bot->sendList($arrayElements, $topElementStyle);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~7 days

Total

3

Last Release

3001d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b3d3a77ec448d390147122dc1a1e4dbfdb6a60113a0352be95a89c13ca999bf5?d=identicon)[Socola Đại Ca](/maintainers/Socola%20%C4%90%E1%BA%A1i%20Ca)

---

Top Contributors

[![SocolaDaiCa](https://avatars.githubusercontent.com/u/18243451?v=4)](https://github.com/SocolaDaiCa "SocolaDaiCa (15 commits)")

---

Tags

botphp

### Embed Badge

![Health badge](/badges/socola-sdk-php-chatfuel-socola/health.svg)

```
[![Health](https://phpackages.com/badges/socola-sdk-php-chatfuel-socola/health.svg)](https://phpackages.com/packages/socola-sdk-php-chatfuel-socola)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M452](/packages/google-gax)

PHPackages © 2026

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