You know what? People love to go online on their phones now, so..AppletIt became a bridge between business and us. But the merchants might prefer itService numberCan not open message so this article lets me teach you how to tie the applet to a service number and let it send the message
I. Basic concepts of small procedures and service numbers
A small program is a tool that can be used directly, and a service number in a tweet is a platform for all kinds of help and information. If you forget the service message when you're doing the little program, you have to do something
In a nutshell, it's actually the same i. D. That's what you call an openid. But keep in mind that this id is one, so whatever micro-credit applications, small programs and service numbers, they have to be identical! So, to be honest, we should be able to find the service numbers of these users in the small program
Ii. Transfer of packages and services
You want a little program tied to a service number? First, we have to get to the open platform, just follow the hints. When it's done, we can not only get the user's openid, but also make it easier for them to switch between small programs and service numbers
Want to send a message? We need to understand how to develop a twitter platform. First of all, we have to set up a developer server on the service, so that, whether you add a new fan or drop your attention, the twitter server will tell us right away. Then we'll see if there's a user on the news and find it to move on。
Access to the list of users of the public number
Want to talk to you? First you know you're watching us. It's a really simple thing to do. We'll just use the twitter public interface to find out who the fans are. So we can send you the information exactly
Remember what we get from this every dayOpenidIt's limited and valid for only 12 hours. Therefore, by placing these openids in the cache for the time being, there would be no need to change the interfaces。

Links between applet users and service number users
We need to figure out who's going after the program. If he's already a fan of your service, then it's convenient to just extract his service number. But what if it's not your fan? Use the front-end wx. Login interface to send encrypted information backstage to help decrypt it。
When we add the public sign, we'll be told you come. With this information, we'll find your openid and keep it in our database. There are, of course, special circumstances that need to be considered, such as that you may already be a fan of ours, or that, while you're concerned, you haven't used our little program。
V. Information for implementation
Message sent, just use the micro-service template! If you set the pattern on the official web, you can send it anywhere! But don't get it wrong
Vi. Summary and outlook
This is a step that connects small programs and service numbers and then easily sends messages to you with service numbers. It's a little twirling, but just do it! And technology's going so fast, there's gotta be a simpler way
Do you have any practical difficulties? Let's talk about how to solve this
== sync, corrected by elderman == @elder man'https://api. Weixin. Qq. Com/cgi-bin/message/template/send? Access token=oa token}'. Format(oa token=oa token)post data = {"touser": oa openid, "template id":template id, "miniprogram": jamp param, "data":param}res=requests. Post (url, json=post data)=res. Json()ifsult=0:return true:return false