查询自定义菜单

查询自定义菜单(包括默认菜单和个性化菜单)的接口说明,请参考:

https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Querying_Custom_Menus.html

参考代码:

Dim ur As String = "https://api.weixin.qq.com/cgi-bin/get_current_selfmenu_info?access_token={0}"
Dim
hc As new HttpClient(Cexp(ur,Functions.Execute("GetAccessToken")))
FileSys
.WriteAllText("c:\data\men.txt",hc.GetData,False)

执行以上代码,可以将菜单配置保存为一个文本文件。

如果希望生成的文本文件可读性更强,可以用JObject格式化一下:

Dim ur As String = "https://api.weixin.qq.com/cgi-bin/get_current_selfmenu_info?access_token={0}"
Dim
hc As new HttpClient(Cexp(ur,Functions.Execute("GetAccessToken")))
Dim
jo As JObject = JObject.Parse(hc.GetData)
FileSys
.WriteAllText("c:\data\men.txt", jo.ToString, False)


本页地址:http://www.foxtable.com/mobilehelp/topics/0203.htm