- Create a Telegram Bot using @botfather keep the token to be used in step 5.
- You need a database for this app to work. Either use another app database or create a new database for this app
- Copy
backend
folder to a folder in your PHP project, we recommendtelegram-live-chat
folder in root. - Setup appropriate routing / URL rewriting (skip this if there is no routing or URL rewriting )
- Make a copy of
livechat-config-sample.php
and rename it tolivechat-config.php
, set<DATABASE_HOST>
,<DATABASE_USER>
,<DATABASE_PASSWORD>
,<DATABASE_NAME>
,<BOT_TOKEN>
(bot token in step 1) and<BOT_ADMIN_SECRET>
appropriately in the config file. - Open
install.php
inbackend
folder to create tables in the database. - Copy
div.telegram_live_chat_main_holder
element infrontend/chat.html
to your website layout. For appropriate position, make sure that is is insidebody
or another element which wraps most of the viewport. Also includebootstrap
,fontawesome
,jquery
dependencies,frontend/style.css
link tag andfrontend/chat.js
script tag in your website layout. - Set appropriate
message.php
url in thechat.js
file to this variable:telegram_live_chat_message_url
. The default is'/telegram-live-chat/backend/message.php'
. - Connect to the bot you created at step 1 and send the message you set as
<BOT_ADMIN SECRET>
in the config file to the bot. - Open your website and start a live chat by entering a name, email , and message.
- You should receive the message in Telegram bot and enjoy the telegram live chat experience.
ehsabd / telegram-live-chat Goto Github PK
View Code? Open in Web Editor NEWThis project forked from aminazgol/web_telegram_support_chat
Connect your website to a simple, private, fast, open, powerful and secure messenger: Telegram!
Home Page: https://telegramlivechat.com