by Devin Yang
(This article was automatically translated.)

Published - 7 years ago ( Updated - 7 years ago )

There is an official EchoBot Sample with a Slim framework. After downloading, you can use composer to try it directly.
After looking at the Slim code, it is not difficult to transfer to Laravel.
It took less than half a day to convert him into a Laravel Project.
Then through Excelify on my GitHub, I converted about 160,000 Excel dictionary file data into SQL Insert syntax,
into the database.

What are the restrictions and precautions for Line Bot ? This article is the result of my own test.

Where to apply for Line Bot:

Limitations as far as I know:

1. Line Bot's solutions are divided into two types: developer testing and free version
After being reminded by netizens in the chat room of CCC , if you want to test the push function,
Please be sure to choose the Developer Trial (developer test) plan. I couldn't push the broadcast with the free one at the beginning.
Also, if there is already a bot in a Line group, we can no longer invite our own bot to join the group.

Here I list the differences between Developer Trial and Free as follows:
Developer Trial plan: There can be up to 50 friends, which means that the number of friends that can be added to the robot is 50, and push broadcasts can be sent.
Free plan: There is no push function, but there is no limit to the number of Bot friends, and you can upgrade to other plans.

Here I list the original text for your reference:
line plan

2. There can only be one robot in a group
If a robot already exists in a group, it cannot invite another one to join.


3. If you choose the Free plan, you cannot use Message Push, and you should choose Developer Trial if you want the Push function.
push api
Here Message push means that the robot actively sends a message to the user.
The Free plan can be changed to a plan with Message Push, which requires a payment of more than 3,000 yuan per month.

If you choose the Developer Trial developer test solution for development testing, you can use the PUSH_MESSAGE function.
I have a simple test, and the pushMessage method in EchoBot is useful.
https://github.com/DevinY/LineEchoBot/blob/master/routes/api.php

I have placed the basic structure of the Laravel framework Echo Bot on my personal Github,
Those who are interested are welcome to download and use by themselves:
https://github.com/DevinY/LineEchoBot

epilogue

If you test the use of Developer Trial in a small group, you can push the required information to the Line group, which is quite convenient.
For example, when someone leaves a message on my website, I want to be notified instantly by the Line bot.


Add as friend
htop

Tags:

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


docker,phpenv

Ran out of Docker IPv4 address pool problem solving

Maybe in the old version of the docker environment, when using Docker compose to start the container, you will encounter the following error: Error response from daemon: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network This is actually this It is a symptom of running out of default-address-pools. In some environments, docker-compose will use the private network of Class B by default. The private IP of segment 172 has a range, from 172.16.0.0 to 172.31.255.255. That is to say, when we start a docker-compose Project, it will eat a private section of Class B, which is very heroic.

laravel

Random passwords in Laravel maintenance mode

The functions mentioned in this article can only be used for Laravel 8 and later versions. If we have some test websites outside Laravel with external IPs, but we only want to access them for ourselves. Here's how I did it for reference

laravel,Laravel security

Lock IP in Laravel debug mode

Laravel's debugging mode is quite rich. Laravel's official website has a reminder that you can set APP_DEBUG to true for local development, but in the production environment, this value must always be False.