WeChat Development (3) create menus and Wechat creation menus

Source: Internet
Author: User

Development (3) create a menu and create a menu


Author: Songyang

This article is from Ashura road and is prohibited for commercial purposes. For more information, see the source.

Link: http://blog.csdn.net/fansongy/article/details/43406073






Overview

If you select a development version, you cannot useFunctionInCustom menuTool, you need to manually add it using the code. This article describes how to add custom menus through http requests.

Principles and tools

If you want to add your own menu, you need to send the create menu message to a URL. You only need to send the changes once to save the changes.

A debugging tool can directly send the edited information to the corresponding website.

Create menu

First, obtain the AccessToken. For more information about how to operate the shoes, see here.

After obtaining the token, enter it after "access_token" of the tool, and then enter a json text in the following format in the body input box:

{"Button": [{"type": "click", "name": "Today's songs", "key": "V1001_TODAY_MUSIC" },{ "name ": "menu", "sub_button": [{"type": "view", "name": "Search", "url": "http://www.soso.com /"}, {"type": "view", "name": "video", "url": "http://v.qq.com/" },{ "type": "click", "name ": "like us", "key": "V1001_GOOD"}]}

There are many types of menu buttons to add, which are usually 3 or 4. For more information, see the official documentation here.

Send add

After entering the information, click the following button to submit the information. It is said that there is a 24-hour delay, and it takes effect immediately after I send it. In addition, an error is reported, and the return code is40001After a while, nothing changed, but the submission was successful. It is estimated that there is a small Bug :)


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.