E
E
Emil Rakhmatullin2020-06-05 14:25:48
API
Emil Rakhmatullin, 2020-06-05 14:25:48

How can I synchronize the site and the telegram channel?

Friends, I need to publish an article on the site, and it will be automatically published in the telegram channel in a video post with a link to the article.

Can this be arranged? Or maybe there is some analogy?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey_Dolg, 2020-06-05
@Andrey_Dolg

Create a bot and make it an admin in the channel.
Api telegram allows, if there is a key from the bot and the channel id, the possibility that he would send a post there. In fact you are just sending get requests with the correct parameters to their api. From php code, this is quite easy to achieve. Or look for plugins for Laravel, I'm sure that such functionality has been written more than once. For the rest of the nuances of the implementation, see the doc, their api is relatively well written.

H
HemulGM, 2020-06-05
@HemulGM

You need to get a board token in telegram. Further, one request is enough, which will allow you to send the desired text to the chat. This is a request to put on the site. I execute the request when adding an article.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question