Facebook Remote Status Update with PHP/cURL Bot
4 stars based on
36 reviews
This tutorial will go through a straightforward set of steps to get a responsive script bot auto update status bot up and running from scratch. I spent a considerable amount of time figuring out how to make a functional telegram bot. I mean sure, the official introduction is good, but theres a lot of stuff about what bots are, and a few scattered instructions about the API, but not enough of structure for a beginner to get up and running quickly. Go to the telegram app on your phone and…. Follow instructions and make a new name for your bot.
If you are making a bot just for experimentation, it can be useful to namespace your bot by placing your name before it in its username, since it has to be a unique name. Although, its screen name can be whatever you like. You have created your first bot.
You should see a new API token generated for it for example, in the previous picture, you can see my newly generated token is Now you can search for your newly created bot on telegram: Go ahead and start chatting with your bot! Every time you message a bot, it forwards your message in the form of an API call to a server.
This server is what processes and responds to all the messages you send to the bot. There are two ways we can go about receiving updates whenever someone sends messages to our bot:. We are going to go with webhooks for this tutorial.
Each webhook is called with an update object. Lets create our server to handle this update. We will be creating our server using node. Once you have node and npm installed:.
After following the instructions, you will end up with a package. You can run this server on your local machine by running node index.
But, this is not enough. The bot cannot call an API if it is running on your local script bot auto update status. It needs a public domain name. This means we have to deploy our application. You can deploy your server any way you want, but I find it really quick and easy to use a service called now. This means your server is deployed on https: Now, all we need to do is let telegram know that our bot has to talk to this url whenver it script bot auto update status any message.
We do this through the telegram API. Enter this in your terminal:. This tutorial will go through a straightforward set of script bot auto update status to get a responsive telegram bot up and running from scratch I spent a considerable amount script bot auto update status time figuring out how to make a functional telegram bot.
So, heres how to make a responsive telegram bot with the least amount of hassle: Set up you bot server Every time you message a bot, it forwards your message in the form of an API call to a server.
There are two ways we can go about receiving updates whenever someone sends messages to our bot: Periodically scan for any messages that may have appeared. Have the bot call an API whenever it receives a message. Much faster and more responsive. Once you have node and npm installed: First, initialize your project Create a new directory and enter it mkdir my-telegram-bot cd my-telegram-bot Initialize your npm project npm init.
Like what I write? Join my mailing list, and I'll let you know whenever I write another post Email Address.