Home >WeChat Applet >WeChat Development >WeChat develops interfaces and parameters for receiving geographical location and links

WeChat develops interfaces and parameters for receiving geographical location and links

Y2J
Y2JOriginal
2017-05-18 13:27:142654browse

Receive ordinary messages

When an ordinary WeChat user sends a message to a public account, the WeChat server will POST the XML data packet of the message to the URL filled in by the developer.

Please note:

1. Regarding retry message duplication, it is recommended to use msgid to deduplicate messages.

2. If the WeChat server does not receive a response within five seconds, it will disconnect and re-initiate the request, retrying three times in total. If the server cannot guarantee to process and reply within five seconds,

can directly reply with an empty string. The WeChat server will not do anything with this and will not initiate a retry. For details, please see "Send Message-Passive Reply to Message".

3. If the developer needs to respond immediately to the user message within 5 seconds, that is, using the "Send Message - Passive Reply Message" interface when passively replying to the user message, you can

Set up message encryption in the Developer Center of the official website of the public platform. After encryption is turned on, messages sent by users and messages replied by developers will be encrypted (but if developers send messages to users through customer service

interfaces and other API calls, they will not be affected. ). For detailed instructions on message encryption and decryption, please see "Sending Messages - Passive Reply Message Encryption and Decryption Instructions".

Geolocation message

<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>1351776360</CreateTime>
<MsgType><![CDATA[location]]></MsgType>
<Location_X>23.134521</Location_X>
<Location_Y>113.358803</Location_Y>
<Scale>20</Scale>
<Label><![CDATA[位置信息]]></Label>
<MsgId>1234567890123456</MsgId>
</xml>

WeChat develops interfaces and parameters for receiving geographical location and links

Link message

<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>1351776360</CreateTime>
<MsgType><![CDATA[link]]></MsgType>
<Title><![CDATA[公众平台官网链接]]></Title>
<Description><![CDATA[公众平台官网链接]]></Description>
<Url><![CDATA[url]]></Url>
<MsgId>1234567890123456</MsgId>
</xml>

WeChat develops interfaces and parameters for receiving geographical location and links

【Related recommendations】

1. WeChat public account platform source code download

2. WeChat People King v3.4.5 Advanced Business Edition WeChat Rubik’s Cube Source Code

3. 小 Pigcms (PigCms) micro-e-commerce system operating version (independent micro-store mall + three-level distribution system )

The above is the detailed content of WeChat develops interfaces and parameters for receiving geographical location and links. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn