当微信粉丝给我发送文本的时候,微信为在我的接口上发送post请求,并携带者xml数据;我在getMsg模块中解析并且返回一段文本;下面的是getMsg模块;下面的是打印出来的xml(我会发送到微信res.end(data))
结果还是没有返回结果;
但是我在调试工具上面调试可以返回结果,
在线等
小伙看你根骨奇佳,潜力无限,来学PHP伐。
I haven’t done WeChat development for a long time, and I don’t know what it’s like now. I remember that the content in <![CDATA[this]]> should be replaced with your own text.
This problem is solved, There are two situations here; 1: Fans send information to the official account; In the case of xml, it is tousername // Official account username
fromusername // 粉丝的username
2: The response from the official account to fans; xml is tousername // fan’s username
fromusername // 公众号的username 所以说;当返回给粉丝的时候,这个需要替换个位置;
I haven’t done WeChat development for a long time, and I don’t know what it’s like now. I remember that the content in <![CDATA[this]]> should be replaced with your own text.
This problem is solved,
There are two situations here;
1: Fans send information to the official account;
In the case of xml, it is tousername // Official account username
2: The response from the official account to fans;
xml is tousername // fan’s username