{"id":19103003,"url":"https://github.com/socoladaica/sdk-php-chatfuel-socola","last_synced_at":"2026-05-28T23:30:19.586Z","repository":{"id":57054768,"uuid":"96792321","full_name":"SocolaDaiCa/SDK-Php-Chatfuel-Socola","owner":"SocolaDaiCa","description":"SDK Php Chatfue Socola","archived":false,"fork":false,"pushed_at":"2018-02-20T00:45:56.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-03T02:34:05.273Z","etag":null,"topics":["bot","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SocolaDaiCa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-10T15:22:33.000Z","updated_at":"2018-07-06T00:25:57.000Z","dependencies_parsed_at":"2022-08-24T14:00:20.050Z","dependency_job_id":null,"html_url":"https://github.com/SocolaDaiCa/SDK-Php-Chatfuel-Socola","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocolaDaiCa%2FSDK-Php-Chatfuel-Socola","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocolaDaiCa%2FSDK-Php-Chatfuel-Socola/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocolaDaiCa%2FSDK-Php-Chatfuel-Socola/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocolaDaiCa%2FSDK-Php-Chatfuel-Socola/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SocolaDaiCa","download_url":"https://codeload.github.com/SocolaDaiCa/SDK-Php-Chatfuel-Socola/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240156777,"owners_count":19756835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","php"],"created_at":"2024-11-09T03:58:51.749Z","updated_at":"2026-05-28T23:30:17.524Z","avatar_url":"https://github.com/SocolaDaiCa.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SDK-Php-Chatfuel-Socola\nSDK Php Chatfue Socola \u003cbr\u003e\nUsing php to generate JSON for Chatfuel bot\n## Create bot\n```php\nuse Socola\\Chatfuel;\n$bot = new Chatfuel();\n```\n## Send text\n```php\n$text = 'Socola';\n$texts = [$text, $text, $text, $text];\n$bot-\u003esendText($text);\n$bot-\u003esendText($texts);\n```\n## Send image\n```php\n$image = 'http://i.imgur.com/luWlRwV.jpg';\n$images = [\n\t'http://i.imgur.com/luWlRwV.jpg',\n\t'http://i.imgur.com/luWlRwV.jpg'\n];\n$bot-\u003esendImage($image);\n$bot-\u003esendImage(images);\n```\n## Send file\n```javascript\n$file = 'https://01b02091.ngrok.io/test.pdf';\n$files = array(\n\t'https://01b02091.ngrok.io/test.pdf',\n\t'https://01b02091.ngrok.io/test.pdf'\n);\n$bot-\u003esendFile($file);\n$bot-\u003esendFile($files);\n```\n## Send audio\n```javascript\n$audio = 'https://01b02091.ngrok.io/test.mp3';\n$audios = [\n\t'https://01b02091.ngrok.io/test.mp3',\n\t'https://01b02091.ngrok.io/test.mp3'\n];\n$bot-\u003esendAudio($audio);\n$bot-\u003esendAudio($audios);\n```\n## Create a button\n### Create Button To URL\n```javascript\n$title = \"button to url\";\n$url = \"http://www.facebook.com\";\n$buttonToURL = $bot-\u003ecreateButtonToURL($title, $url, $setAttributes = Null);\n```\n### Create Button To Block\n```javascript\n$title = \"button to block\";\n$block = \"re-start\";\n$buttonToBlock = $bot-\u003ecreateButtonToBlock($title, $block, $setAttributes = Null);\n```\n### Create Button Share\n```javascript\n$buttonShare = $bot-\u003ecreateButtonShare();\n```\n### Create Button Call\n```javascript\n$phoneNumber = '096******5';\n$buttonCall  = $bot-\u003ecreateButtonCall($phoneNumber, $title = 'Call');\n```\n### Create Button Quick Reply\n```javascript\n$block = 're-start';\n$blocks = [\n\t'play',\n\t'pause'\n];\n$bot-\u003ecreateButtonQuickReply($title, $block);\n$bot-\u003ecreateButtonQuickReply($title, $blocks);\n```\n\n### Send a text card with one or more button (max 3 buttons)\n```javascript\n$text = 'this is text card';\n$uttons = [\n\t$buttonToURL,\n\t$buttonToBlock,\n\t$buttonShare\n];\n$bot-\u003esendTextCard($text, $button);\n$bot-\u003esendTextCard($text, $buttons);\n```\n\n### Create element\n```javascript\n$title    = 'this is element';\n$image    = 'http://i.imgur.com/luWlRwV.jpg';\n$subTitle = 'this is sub title';\n$element  = $bot-\u003ecreateElement($title, $image, $subTitle, $button_or_arrayButtons);\n$arrayElements = array(\n\t$element1,\n\t$element2\n);\n```\n\n### Send a gallery\n```javascript\n$bot-\u003esendGallery($element_or_arrayElements);\n```\n\n### Send a list template min 2 element\nYou can switch type “top_element_style” between “large” and “compact”.\n```javascript\n$topElementStyle = 'large';\n$bot-\u003esendList($arrayElements, $topElementStyle);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocoladaica%2Fsdk-php-chatfuel-socola","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocoladaica%2Fsdk-php-chatfuel-socola","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocoladaica%2Fsdk-php-chatfuel-socola/lists"}