This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12691|Reply: 1

WeChat development how to customize the menu

[Copy link]
Posted on 8/30/2016 3:24:19 PM | | | |


The WeChat test account I use cannot be set in the background like on the WeChat public platform.

At first, I thought I couldn't customize the menu, but on the permissions menu, I saw that I could customize the menu

Custom menus, not direct visual interfaces as we usually do, here you need to customize the menu with code.

http://mp.weixin.qq.com/wiki/10/0234e39a2025342c17a7d23595c6b40a.html
This is a detailed document

The custom menu interface can implement various types of buttons, such as:

1. Click: Click to push the event
After the user clicks the click type button, the WeChat server will push the structure of the message type event to the developer through the message interface (refer to the message interface guide), and bring the key value filled in by the developer in the button, and the developer can interact with the user through the customized key value.
2. view: Jump to the URL
After the user clicks the view type button, the WeChat client will open the web page URL filled in by the developer in the button, which can be combined with the web page authorization to obtain the user's basic information interface to obtain the user's basic information.
3. scancode_push: Scan the code to push the event
After the user clicks the button, the WeChat client will bring up the scan tool, display the scan result (if it is a URL, it will enter the URL) after completing the scanning operation, and the scan result will be sent to the developer, who can send a message.
4. scancode_waitmsg: Scan the code to push the event and the "Message Received" prompt box pops up
After the user clicks the button, the WeChat client will call up the scan tool, and after completing the scanning operation, the scanning result will be sent to the developer, and then put away the scan tool, and then the "message is being received" prompt box will pop up, and then you may receive a message from the developer.
5. pic_sysphoto: The pop-up system will take pictures and send pictures
After the user clicks the button, the WeChat client will call up the system camera, and after completing the photo operation, it will send the captured photo to the developer, and push the event to the developer, and put away the system camera at the same time, and then may receive a message from the developer.
6. pic_photo_or_album: Pop up to take a photo or send a picture in an album
After the user clicks the button, the WeChat client will pop up a selector for the user to choose "Take a photo" or "Select from the mobile album". After the user chooses, he goes through the other two processes.
7. pic_weixin: Pop up the WeChat album mapper
After the user clicks the button, the WeChat client will bring up the WeChat album, and after completing the selection operation, the selected photo will be sent to the developer's server, and the event will be pushed to the developer, and the album will be put away, and then the message from the developer may be received.
8. locatio{filter}n_select: pop up the geolocation selector
After the user clicks the button, the WeChat client will bring up the geolocation selection tool, and after completing the selection operation, the selected geographical location will be sent to the developer's server, and the location selection tool will be put away, and then the developer may receive a message.
9. media_id: Send messages (except text messages)
After the user clicks the media_id type button, the WeChat server will send the material corresponding to the permanent material ID filled in by the developer to the user, and the permanent material type can be picture, audio, video, or graphic message. Note: The permanent asset ID must be a legitimate ID obtained after uploading the "Material Management/Add Permanent Material" interface.
10. view_limited: Jump to the URL of the graphic message
After the user clicks the view_limited type button, the WeChat client will open the URL of the graphic message corresponding to the permanent material ID filled in by the developer in the button. Note: The permanent asset ID must be a legitimate ID obtained after uploading the "Material Management/Add Permanent Material" interface.


Custom menu methods:

http request method: POST (please use https protocol) https://api.weixin.qq.com/cgi-bin/menu/create?access_token=ACCESS_TOKEN

post's json data:







Previous:SQL Server database deletes all tables
Next:WeChat public account development series of tutorials
Posted on 11/7/2017 2:48:58 PM |
Thank you landlord for sharing, you can refer to it
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com