PHP Classes

File: examples/inline_keyboard.php

Recommend this page to a friend!
  Classes of Saeb Khanzadeh   Gap SDP API   examples/inline_keyboard.php   Download  
File: examples/inline_keyboard.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Gap SDP API
Send messages with the Gap instant messenger
Author: By
Last change:
Date: 5 years ago
Size: 355 bytes
 

Contents

Class file image Download
<?php

require dirname(__FILE__) . '/../vendor/autoload.php';

use
Gap\SDP\Api;

$token = {HERE YOUR TOKEN};

$gm = new Api($token);

$chat_id = {HERE CHAT ID};

// send text
$gm->sendText($chat_id, 'Hello world', null, [
    [
        [
           
"text" => "click",
           
"cb_data" => "c_1"
       
]
    ],
    [
        [
           
"text" => "google",
           
"url" => "http://google.com"
       
]
    ],
]);