码迷,mamicode.com
首页 > 微信 > 详细

初次接触微信公众号开发,相关资料记录

时间:2018-01-11 11:22:43      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:自动   开发者   难题   gif   cal   .com   文件   access   工具   

1. 自动授权模式,无需写死AppSecret

  到微信第三方开放平台注册账号,申请开发者资质认证,后可使用自动授权

  https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419318292&token=&lang=zh_CN

 

  或直接使用AppSecret获取access_token,但是不安全,也容易在AppSecret重置后失效

 

2. 微信公众账号接口说明文档

  https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433401084

  

3. 我这次查询,主要是想使用“微信JS-SDK说明文档”,好实现将网站的网页 分享到朋友圈 或 发送给彭友时,可以显示指定的缩略图 和 简介。

    分别使用到三个文档:

  1)js-sdk说明文档

    https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115

  2)授权后如何调用js-sdk

    https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1421823488&token=&lang=zh_CN

  3) 授权流程

    https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1453779503&token=&lang=zh_CN

 

4. 在线Debug工具

  原文:http://ngdemo.sinaapp.com/debug/?hash=test

在线Debug工具

本工具为了解决移动端console日志无法查看的难题,只需要一个js文件即可在本页面实时查看console日志!

Js文件地址:http://ngdemo.sinaapp.com/library/debug?hash=debug 请把debug改成你自己的参数

使用方法

  1. 在需要调试的页面写入 <script src="http://ngdemo.sinaapp.com/library/debug?hash=debug"></script>
  2. 打开本页面,下方即可实时查看JS日志

源代码如下:

var socket = new WebSocket("ws://localhost:18080"); var connected = false; window.console.log = function(o) { o =typeof o == "object"?JSON.stringify(o):o; var timer = setInterval(function(){ if(connected){ timer && clearInterval(timer); socket.send(JSON.stringify({hash:"debug",msg:o,type:"msg"})); } },100); } socket.onopen = function(e){ connected = true; console.log("[110.87.105.11] "+navigator.appVersion+" connected."); }; socket.onclose = function(e){ connected = false; }; socket.onmessage = function(e){ }; window.onerror = function (err, url, line) { if(connected){ socket.send(JSON.stringify({hash:"debug",error:err,url:url,line:line,type:"error"})); } return true; };

 

初次接触微信公众号开发,相关资料记录

标签:自动   开发者   难题   gif   cal   .com   文件   access   工具   

原文地址:https://www.cnblogs.com/yingsong/p/8266841.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!