Cara Install dan Guna API Telegram PHP

    1. Dapatkan hosting VPS yang murah dan mudah diuruskan. Anda boleh dapatkan disiniĀ .
    2. Setup VPS anda.
    3. Install Composer. Ikut tutorial disini.
    4. Menggunakan git command, copy repo ini ke VPS anda, copy ke destinasi direktori laman web anda contoh : /var/www/lamanweb.com/public_html/telegram
      git clone https://github.com/php-telegram-bot/example-bot.git
    5. Pastikan anda telah daftar dan perolehi API Telegram. Panduan ikut disini.
    6. Ikut panduan setting Webhook Telegram API disini.
    7. Pastikan Webhook telah disetkan dengan parameter yang tepat seperti yang ditunjuk dlm tutorial No. 6
    8. Hantar message kepada Bot Telegram anda , contoh mesej : /help. Sekiranya berjaya, anda akan perolehi message seperti di bawah :
      Commands List:
      /cancel – Cancel the currently active conversation
      /date – Show date/time by location
      /echo – Show text
      /editmessage – Edit message
      /forcereply – Force reply with reply markup
      /help – Show bot commands help
      /hidekeyboard – Hide the custom keyboard
      /image – Send Image
      /inlinekeyboard – Show inline keyboard
      /keyboard – Show a custom keyboard with reply markup
      /markdown – Print Markdown text
      /shortener – Botan Shortener example
      /slap – Slap someone with their username
      /survey – Survery for bot users
      /weather – Show weather by location
      /whoami – Show your id, name and usernameFor exact command help type: /help <command>
    9. Sekian.

Leave a Reply

Your email address will not be published. Required fields are marked *