Public platform development debugging tutorial
Tip: Use Chrome or download Firefox for the tools provided in this article, because most high-end development does not support IE (or browsers earlier than IE8)
I. Public platform interface debugging tools
Go to address https://mp.weixin.qq.com/debug,
Select the type to be debugged in the interface type. For the basic message debugging, select message interface debugging.
Select the type you want to debug in the interface list. The text message is used as an example.
Here we mainly fill in URL and Content,
URL is the interface address developed by ourselves, and Content is the text message Content to be sent to this interface address,
Enter the following information:
URL: http://discuz.comli.com/test.php
Content: Fang Times studio |
The following parameters can be entered as needed, because we only test the content,
* ToUserName: developer ID
* FromUserName: sender's account (an OpenID)
* CreateTime: Message creation time (integer)
* MsgId: Message Type (Message id, 64-bit integer) |
If you do not know what to fill in, you can use the data in the xml below to fill in
<Xml>
<ToUserName> <! [CDATA [gh_000079813ed64]> </ToUserName>
<FromUserName> <! [CDATA [ojpX_jig-gyi3_Q9fHXQ4rdHniQs]> </FromUserName>
& Lt; CreateTime & gt; 1412079737 & lt;/CreateTime & gt;
<MsgType> <! [CDATA [text]> </MsgType>
<Content> <! [CDATA [Fang Times studio]> </Content>
<MsgId> 6064836289959967853 </MsgId>
</Xml> |
After filling in, as shown below
Click "check problem ".
The last row prompts that the request is successful, indicating that the data is successfully sent and received. You can check whether the returned data is consistent with your own program interface.
Ii. Use the web version for debugging
Open the webpage address in the browser: https://wx.qq.com/. a QR code is displayed on the page.
Use the scan function on your mobile phone to scan the QR code.
Click "log on to WEB version". The following figure is displayed on your mobile phone:
You can see the "webpage logged on" on the top of the page.
The browser will display a page with the mobile phone version. Double-click the public account to be debugged and send the corresponding keywords for testing. As shown below
Iii. Square times Debugger
The debugger is a tool developed by Fang Times studio for public platform interface development and debugging, it can be used to verify tokens, simulate follow-up and cancel follow-up, send text/images/Voice/Video/location/link, and send simulated events. Its prototype is the Emulator of microservices.
The debugger currently does not support the use of IE. Please download Chrome or Firefox.
The debugger address is http://debug.fangbei.org /.
The interface is as follows:
Usage
1. Token Verification
In the URL input box and Token input box, enter the public account interface URL and Token respectively,
Click the "Token Verification" button. If the Token verification is successful, a message box is displayed. If the Token verification fails, a message box is displayed.
2. Send messages
Select a message type, such as "text". The parameters of the message type are listed. Fill in the parameters to be sent, and click "Send message.
The sent XML is displayed in the message sending box, And the received XML data is displayed in the message receiving box.
The preview chart is displayed on the right.